(By Dustin Volz,┬áReuters) — Apple chief Tim Cook on Wednesday said that complying with a court order to help the FBI break into an iPhone belonging to one of the San Bernardino shooters would be “bad for America,” and set a legal precedent that would offend many Americans.

“Some things are hard, and some things are right, and some things are both — this is one of those things,” Cook told ABC News in his first interview since the court order came down last week.

Apple’s chief executive officer also said there should have been more dialogue with the Obama administration before the U.S. Justice Department’s decision to seek relief from a federal magistrate judge in California.

“We found out about the filing from the press, and I don’t think that’s the way the railroad should be run, and I don’t think that something so important to this country should be handled in this way,” Cook said.

Apple has publicly said it intends to fight the court order and has until Friday to respond to the court order.

The iPhone in question was used by San Bernardino shooter Rizwan Farook, who along with his wife went on a shooting rampage in December that killed 14 and wounded 22.

(Reporting by Dustin Volz; Additional reporting by Tim Ahmann; Editing by G Crosse and Jonathan Oatis)

AI. Messaging. Bots. Arm yourself for the next paradigm shift at MobileBeat 2016. July 12-13 at The Village in San Francisco. Reserve your place here.