A fierce behind-the-scenes dispute between House Speaker Nancy Pelosi's office and Facebook erupted into public view Friday, as the speaker's office demanded that Facebook remove a video posted online by President Donald Trump.

The video in question showed Pelosi's viral State of the Union moment ripping up the text of Trump's speech Tuesday night, but was edited to make it appear that she ripped the speech even as Trump saluted a Tuskegee airman in the audience. In fact, Pelosi's speech-ripping gesture came at the end of the president's speech, and her office said it was in response to the totality of the speech and what Pelosi saw as misinformation in it.

The video, labeled "Powerful American stories ripped to shreds by Nancy Pelosi," was posted on both Facebook and Twitter. Trump tweeted the video from his Twitter account just before 6 p.m. Thursday to his more than 72 million followers.

Trump video.

Within hours, the speaker's office was demanding both social media companies remove the video, arguing it was unfair to Pelosi, who actually stood and applauded the airman during the speech.

Both Facebook and Twitter decided against removing the Trump video, although the companies cited different reasons for their decisions.

The dispute became public Friday when Pelosi's deputy chief of staff, Drew Hammill, posted a link to a criticism of the video Friday afternoon, writing "The latest fake video of Speaker Pelosi is deliberately designed to mislead and lie to the American people, and every day that these platforms refuse to take it down is another reminder that they care more about their shareholders' interests than the public's interests."

Andy Stone, a Facebook spokesman, replied to Hammill on Twitter: "Sorry, are you suggesting the President didn't make those remarks and the Speaker didn't rip the speech?"

Hammill fired back: "What planet are you living on? This is deceptively altered. Take it down."

In the end, both Facebook and Twitter declined to remove the Trump campaign post, citing corporate policies.

Facebook's Stone told CNBC, "I can confirm for you that the video doesn't violate our policies."

Stone said the company's policies against altered video specifically refer to video that has been edited to make it appear a person said something they didn't say or did something they didn't do.

Facebook's response left Pelosi's Hammill frustrated.

"I think they have a history here of promoting and making money off of content that is intentionally false," Hammill said.

Twitter, for its part, has a new set of policies around manipulated media that the company announced Tuesday. The company imposed a new rule on its users: "You may not deceptively share synthetic or manipulated media that are likely to cause harm. In addition, we may label Tweets containing synthetic and manipulated media to help people understand the media's authenticity and to provide additional context."

To determine that, Twitter said it would examine videos to ascertain "whether the content has been substantially edited in a manner that fundamentally alters its composition, sequence, timing or framing" as well as looking at "any visual or auditory information (such as new video frames, overdubbed audio or modified subtitles) that has been added or removed."

But that policy doesn't go into effect until March 5, and Twitter told Pelosi's office that it will not remove the Trump video under its current rules. Asked if the Trump video would violate Twitter's policies if it is posted again after March 5, Twitter spokeswoman Katie Rosborough wrote in an email: "I can't get into hypotheticals."

A Trump campaign spokesman said the president's reelection effort is unconcerned about Pelosi's reaction to the video.

"If Nancy Pelosi fears images of her ripping up the speech, perhaps she shouldn't have ripped up the speech," said Trump campaign spokesman Tim Murtaugh. In less than 24 hours, Murtaugh said, the video has received 2.1 million views, has reached almost 5 million people and has been shared more than 23,000 times.

It wasn't immediately clear who actually produced the video in question. The Trump campaign referred that question to the White House, and spokespeople there did not respond to a request for comment.

As all of that was happening, Pelosi's office was fighting to get Facebook to remove a second video of Nancy Pelosi that the speaker's office also complained about: This one a deceptively edited video of Pelosi appearing on The Colbert Report in a comedy segment. The altered video made it appear that Pelosi was eating Tide Pods, and Facebook has a policy against that.

Facebook took the Tide Pod video down.

"When the Tide Pod challenge began we said we would take down any such videos brought to our attention out of concern for people's safety, which is why we've removed this video from our platform," a Facebook spokesman said.