LOS ANGELES — Sony Pictures made “The Interview” available online on Wednesday, a day before its theatrical release, after reversing a decision made a week ago to cancel the movie’s release following a massive cyberattack.

The film was available for rental on Google Inc.’s YouTube site early Wednesday afternoon. Microsoft Corp. and Sony itself also are showing the comedy, a day before its scheduled premiere at some 320 independent theaters.

“We chose the path of digital distribution first so as to reach as many people as possible on opening day, and we continue to seek other partners and platforms to further expand the release,” Sony Entertainment Chief Executive Michael Lynton said in a statement.

He added that Sony first had reached out to Google, Microsoft “and other partners” on Dec. 17, the day the studio said it was canceling the movie’s Christmas Day release.

The movie, which stars Seth Rogen and James Franco and is about a fictional plot to assassinate North Korean leader Kim Jong Un, triggered the most destructive cyberattack ever to target a U.S. company, resulting in the release of hundreds of embarrassing emails and confidential data.

President Barack Obama last week blamed the cyberattacks on North Korea and added to a chorus of criticism by politicians and Hollywood actors, screenwriters and directors accusing Sony of caving to the hackers’ demands by censoring itself.

In addition to YouTube Movies, Google Play and Microsoft’s Xbox Video, the comedy will be available on a dedicated website, www.seetheinterview.com, to rent for $5.99 or buy for $14.99. No cable or satellite TV operator has yet agreed to make “The Interview” available through video on demand.

The showing is a chance for Google and Microsoft, which have been bit players in a video-on-demand market dominated by Apple, Amazon.com and cable and satellite operators, to raise their profile.

It was unclear the extent to which the online release would dampen moviegoers’ appetite to see the comedy in the independent theaters that announced on Tuesday they planned to show it.

Many Christmas Day screenings were sold out, including one that begins right after midnight at the 184-seat Silent Movie Theater in Los Angeles.

“I need to say that a comedy is best viewed in a theater full of people, so if you can, I’d watch it like that,” Rogen tweeted. “Or call some friends over.”

Google said it had weighed the security implications of screening the movie — described by reviewers as “profane” and “raunchy” — after Sony contacted the company about making it available online.

“But after discussing all the issues, Sony and Google agreed that we could not sit on the sidelines and allow a handful of people to determine the limits of free speech in another country (however silly the content might be),” Google’s chief legal officer, David Drummond, wrote in a blog post.

Google has an “enormous” infrastructure that is well tested in fighting off denial of service and other attacks, said Barrett Lyon, principal strategist with F5 Networks and an expert in Internet network security.

“I wouldn’t imagine seeing ‘lights-out’ at YouTube,” Lyon said, adding that Microsoft could be more vulnerable

Sony pulled the movie after major theater chains refused to show it. That followed threats of Sept. 11 style attacks from Guardians of Peace, the group that claimed responsibility for the cyberattacks against Sony.

The White House on Wednesday praised the decision to release the film.

“As the president made clear on Friday, we do not live in a country where a foreign dictator can start imposing censorship here in the United States,” White House spokesman Eric Schultz said in a statement. “With today’s announcements, people can now make their own choices about the film, and that’s how it should be.”

A national security official said on Tuesday that U.S. authorities did not take the hackers’ threats against theatergoers seriously.

CNN, which first reported that Sony was in talks with Google’s YouTube on releasing the movie, said the studio also had held talks with Apple about making the comedy available on its iTunes store but that the negotiations broke down.

Obama vowed in a news conference on Friday to respond to the cyberattack “in a place and timing and manner that we choose.”

Japan, meanwhile, has begun working to ensure basic infrastructure is safe and to formulate its diplomatic response, officials said, fearing it could be a soft target for possible North Korean cyberattacks in the escalating row over the Sony Pictures hack.

And South Korea is seeking the cooperation of Chinese authorities in a probe into a cyberattack on its nuclear power plant operator after tracing multiple Internet addresses involved to a northeastern Chinese city near North Korea, a prosecution official said.