The New Republic has retracted a vulgar and homophobic op-ed about Pete Buttigieg by openly gay literary critic Dale Peck.

The magazine had published the piece, titled “My Mayor Pete Problem,” on its website on Friday.

In the piece, Peck described Buttigieg as “the gay equivalent of Uncle Tom,” and he referred to the presidential candidate as “Mary Pete” throughout the column.

Peck argued that because Buttigieg waited until his early 30s to come out as gay, he would be too preoccupied with sex and drugs to be an effective president. The piece also crudely speculated about intimate details of Buttigieg’s personal life.

Almost immediately, social media erupted in widespread condemnation.

Holy crap, that TNR piece about Buttigieg is... rambling, gross, and bizarre. I don’t understand the purpose of it? — Parker Molloy (@ParkerMolloy) July 12, 2019

Holy moly that TNR piece on Buttigieg is absolutely bonkers — Blake News (@blakehounshell) July 12, 2019

What utter, puerile, homophobic dreck. If this is what we can expect from Chris Lehmann, TNR should be looking for a new editor. — Harry Simon (@Harrydoesntmind) July 13, 2019

Hours later the op-ed was taken down and replaced by an editor’s note saying: “Dale Peck’s post ‘My Mayor Pete Problem’ has been removed from the site, in response to criticism of the piece’s inappropriate and invasive content. We regret its publication.”

The New Republic's editor, Chris Lehmann, added separately in a statement, "The New Republic recognizes that this post crossed a line, and while it was largely intended as satire, it was inappropriate and invasive."

The Buttigieg campaign declined to comment.

Peck, an author and literary critic whose published pieces have drawn controversy before, did not respond Saturday to a request for comment.