Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The FBI on Friday formally accused the North Korean government of the hacking attack that led Sony Pictures Entertainment to cancel the movie “The Interview.”

Sony also received a message saying that it was “very wise” to cancel the movie and warning the studio to prevent its release in any form, including “DVD or piracy,” a source close to the studio told CNBC. NBC News could not immediately authenticate the message.

U.S. officials had said privately earlier in the week that they suspected North Korea. The FBI said Friday that technical analysis had revealed links to North Korean-developed malware, including lines of code and encryption algorithms.

“North Korea’s actions were intended to inflict significant harm on a U.S. business and suppress the right of American citizens to express themselves,” the bureau said in a statement. “Such acts of intimidation fall outside the bounds of acceptable state behavior.”

President Barack Obama said there was no evidence another country was involved.

Sony took the unprecedented step on Wednesday of canceling the Christmas Day release of the film, a Seth Rogen-James Franco comedy about a plot to kill the North Korean dictator, after the hackers threatened violence against theaters that showed it.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Obama said he believed Sony had made a mistake.

“Imagine what they start doing when they see a documentary that they don’t like or news reports that they don’t like,” he said at a year-end press conference, referring to the hackers. “Or even worse, imagine if producers and distributors and others start engaging in self-censorship because they don’t want to offend the sensibilities of somebody whose sensibilities probably need to be offended. That’s not who we are.”

A White House spokesman said on Thursday that the United States would consider a “proportional response” if it determined that North Korea was behind the hacking. He did not rule out an attack on North Korean computer systems.

Obama said: “We will respond in a place and time and manner that we choose.”

The FBI statement credited Sony for its cooperation in the investigation.

“Identifying those responsible for these attacks is only the first step, and we will continue to do our part to protect and defend our nation from the asymmetric threats posed through cyberspace,” said John Carlin, the assistant attorney general for national security.

The massive hacking attack also captured personal information about Sony employees and embarrassing emails sent by top Sony executives.

Some Celebrities voiced outrage about the canceling of the movie, arguing that Sony had capitulated to terrorists and dealt a blow to free expression.

IN-DEPTH

— Pete Williams