WASHINGTON — Twitter reversed course Friday and allowed Mitch McConnell back on the platform — a day after major GOP groups threatened to yank ad dollars from the social media giant in protest.

The Senate majority leader’s campaign page celebrated his return by posting a “Shawshank Redemption” freedom GIF with McConnell’s face.

“Victory!!!,” @Team_Mitch tweeted. “Thank you to EVERYONE for helping #FreeMitch.”

McConnell had been locked out of his Twitter account since Wednesday for posting a video of protesters outside his Kentucky home yelling for the GOP leader to “die.”

Twitter said it locked the account because the video violated its violent threats policy, “specifically threats involving physical safety.” McConnell’s campaign would have to delete the video in order to restore his Twitter privileges.

Fighting back, President Trump’s re-election campaign, the Republican National Committee, the House and Senate GOP campaign arms and the Senate Leadership Fund all announced a suspension of ad spending, citing anti-conservative bias. Hundreds of thousands in ad spending was at stake for Twitter.

Twitter didn’t mention the boycott specifically Friday, but said it changed course after reviewing the case “more closely.”

“Several Twitter users, including US Senate Majority Leader Mitch McConnell’s campaign account, were temporarily locked out of their accounts for Tweeting a video that violated our abusive behavior policy,” the Twitter communications team tweeted.

“The video contained a violent threat directed at Leader McConnell, a clear violation of the Twitter Rules. After multiple appeals from affected users and Leader McConnell’s team confirming their intent to highlight the threats for public discussion, we have reviewed this case more closely.”

Twitter continued: “Going forward, the video will be visible on the service with a sensitive media interstitial and only in cases where the tweet content does not otherwise violate the Twitter Rules.”

McConnell’s team touted the triumph by asking supporters for donations to his re-election campaign.

“Help us keep winning,” the campaign tweeted.