"I deeply regret" the comments, Bashir said in a statement. "It is my sincere hope that all of my colleagues, at this special network, will be allowed to focus on the issues that matter without the distraction of myself or my ill-judged comments."

His resignation, effective immediately, was accepted by MSNBC president Phil Griffin, who in a statement thanked him "for three great years" with the network.

The uproar began last month when Bashir suggested that someone should defecate in Palin's mouth because of a remark the former vice presidential candidate made comparing the United States' indebtedness to China with slavery.

Bashir criticized Palin and her "long-diseased mind" after playing video of her speech about China. He told the story of Thomas Thistlewood, a former overseer at a plantation who described in diaries how he dealt with wayward slaves by, in one case, having another slave defecate in the mouth of the miscreant. In another case, someone urinated in the face of a slave being punished.

"When Mrs. Palin invokes slavery," Bashir said, "she doesn't just prove her rank ignorance, she confirms (that) if anyone truly qualifies for a dose of discipline from Thomas Thistlewood, then she would be the outstanding candidate."

Bashir apologized days later. But the controversy continued to rage, with Palin's political action committee writing to Griffin and NBC News President Deborah Turness seeking discipline for Bashir, and Palin cancelling a scheduled interview with NBC's Matt Lauer.

A phone message left with SarahPAC treasurer Tim Crawford, who signed the letter the committee sent to MSNBC, was not immediately returned Wednesday night.

In an interview with "Fox News Sunday" last month, Palin said MSNBC had condoned Bashir's comments.

"That's hypocrisy," she said. When a conservative woman is a target on MSNBC "they usually just kind of pooh-pooh it, laugh it off. It's no big deal."

Bashir's departure leaves a void in MSNBC's weekday schedule, where he had filled the 4 p.m. EST hour. MSNBC contributor Joy-Ann Reid has subbed for him in recent days. A permanent replacement will be named in the coming weeks, the network said.

Bashir came to MSNBC in 2010 from ABC News' "Nightline." He had joined ABC in 2004 as a correspondent for "20/20."

Before that, the London-born journalist won attention for documentaries including "Living With Michael Jackson," which in 2003 aired on ABC to a huge audience, and his exclusive interview with Princess Diana in 1995.

Bashir's exit from MSNBC coincided with the network parting company with actor Alec Baldwin, who was suspended from his weekly talk show after just two weeks for using an anti-gay slur in a New York City street encounter.