A high-ranking editor at The New York Times was demoted following recent incidents that resulted in a heavy backlash on social media.

The Times confirmed to Fox News on Tuesday that the editor, Jonathan Weisman, has been demoted for his “serious lapses in judgment.”

“Jonathan Weisman met with [New York Times Executive Editor] Dean Baquet today and apologized for his recent serious lapses in judgment. As a consequence of his actions, he has been demoted and will no longer be overseeing the team that covers Congress or be active on social media. We don’t typically discuss personnel matters, but we’re doing so in this instance with Jonathan’s knowledge,” a Times spokesperson told Fox News.

In a now-deleted tweet from late July, Weisman, deputy Washington bureau editor, received unwanted attention for rejecting the notion that Reps. Rashida Tlaib, D-Mich., and Ilhan Omar, D-Minn., are truly “from the Midwest” in response to comments made by former Sen. Claire McCaskill.

“Saying @RashidaTlaib (D-Detroit) and @IlhanMN (D-Minneapolis) are from the Midwest is like saying Lloyd Doggett (D-Austin) is from Texas or @repjohnlewis (D-Atlanta) is from the Deep South. C’mon,” Weisman wrote.

He faced another round of criticism after writer Roxane Gay published emails he had sent to her and her assistant demanding an “enormous apology” for what he described as her “ad hominem attack” against him on Twitter.

“You misconstrued my rather innocuous tweet, willfully or mistakenly, accused me of racism, and incompetence, seemed to want me fired, and since I have now written off Twitter completely, I was hoping to speak to communicate to clarify my meaning and to understand yours,” Weisman wrote in the email. “I believe you owe me an enormous apology, and if you would hear me out, I think you would agree.”

The controversy was mentioned at a staff meeting Baquet held at The Times on Monday/ (That meeting is said to have mainly focused on a dust-up over a critically drubbed headline about President Trump’s remarks in the wake of this month’s deadly mass shootings.)