Google wrote in a blog post that Sony contacted it on Dec. 17, when it first became clear that the film’s planned theatrical release would be scrapped and before irate Hollywood stars and President Obama began criticizing the studio for caving. The Google post said that it was “eager to help — though given everything that’s happened, the security implications were very much at the front of our minds.”

Image Google offered “The Interview” in its Play store as well as on YouTube. Credit... Agence France-Presse — Getty Images

Brad Smith, Microsoft’s general counsel, wrote in a blog post on Wednesday that “a cyberattack on anyone’s rights is a cyberattack on everyone’s rights, and together we need to defend against it.”

He added, however, “We’re not endorsing this movie or any other.”

After suffering financially from the diminished theatrical release of “The Interview,” Sony will help its bottom line with the online distribution. Studios have been eager to increase on-demand viewing because they keep as much as 75 percent of that revenue. And although contracts vary, studios receive roughly 50 percent of ticket revenue from movie theaters, with the theater owners keeping the other half.

Sony’s hope is that the Google and Microsoft deals, which do not cover viewing abroad, will serve as an icebreaker for other partners. Last week, the movie studio contacted cable and satellite companies to rent “The Interview” but was rebuffed. Apple similarly refused.

Apple has had problems with the security of its iCloud storage system; celebrities’ individual accounts were hacked in late summer.

In its statement, Google said it “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 also has business interests in play. YouTube is mostly known for free viewing but has offered a video rental service since 2011. “The Interview” and the surrounding attention could give that service a boost.