President Donald Trump railed against Twitter after the social media network suspended the personal account of Republican State Senator Doug Mastriano on Friday, accusing the network of attempting to “silence the truth” by banning the lawmaker. The account has now been reinstated, after Twitter said it had made an “error.”

A Twitter spokesperson told Newsweek in a statement: “This account was mistakenly suspended for perceived violations of our impersonation policy. This was an error. We have immediately reversed the decision and the account has been reinstated.”

Reacting to the suspension, Trump compared the actions of Twitter with those of a communist country, and said the social network’s decision could not stand.

“Wow! Twitter bans highly respected Pennsylvania State Senator Doug Mastriano after he did a great job of leading a hearing on the 2020 Election fraud,” Trump tweeted. “They and the Fake News, working together, want to SILENCE THE TRUTH. Can’t let that happen. This is what Communist countries do!”

A little less than an hour earlier, Pennsylvania State Sen. Mastriano posted a screenshot from his phone showing his personal account was suspended. A message on the lawmaker’s account said the network bans accounts that violate its rules.

“This censorship is unacceptable in America. A nation that I served for most of my adult life,” Mastriano tweeted from his official account. “The point of Twitter suspending this personal account is to prevent me from posting to my Senate account—to silence our voice.”

Newsweek has contacted State Sen. Mastriano’s office for comment. This article will be updated with any response.

Mastriano opened a Republican-led public hearing on supposed “election issues” in Pennsylvania earlier this week. The meeting focused on claims of voter fraud taking place in the state.

President Trump made an over-the-phone appearance at the event, falsely claiming that he had won the state instead of President-elect Joe Biden.

“This election was rigged and we can’t let that happen. We can’t let it happen to our country,” the commander-in-chief told the hearing. “And this election has to be turned around because we won Pennsylvania by a lot and we won all these swing states by a lot.”

A federal judge dismissed a Trump re-election campaign lawsuit in Pennsylvania on Saturday, saying he could not “justify the disenfranchisement of a single voter” in his final decision.

Donald Trump in Rose Garden
President Donald Trump speaks during the annual Thanksgiving turkey pardon in the Rose Garden of the White House in Washington, DC on November 24, 2020.
Mandel Ngan/AFP via Getty Images

Update 11/27/20, 11:55 a.m. ET: This article and its headline were updated to reflect comment from Twitter on the reason for Mastriano’s account suspension.

p:last-of-type::after,.node-type-slideshow .article-body>p:last-of-type::after{content:none}]]>