White House communications director Anita Dunn will resign by the end of the month, the Obama administration confirmed on Tuesday morning.

Dunn, who signed on for a temporary stint after Ellen Moran stepped down from the post, will stay on as a consultant. Deputy communications director Dan Pfeiffer will replace her.

Dunn's tenure has not been without controversy. She helped lead the White House battle against Fox News, once calling the network an "arm of the Republican Party."

"The reality of it is that Fox News often operates almost as either the research arm or the communications arm of the Republican Party," she told CNN. "And it is not ideological ... what I think is fair to say about Fox, and the way we view it, is that it is more of a wing of the Republican Party."

Conservatives, including Fox host Glenn Beck, criticized Dunn after a video clip surfaced in which she referred to Mao Zedong as one of her "favorite political philosophers."

Dunn said she meant the reference to be ironic. Here's the full quote:

"The third lesson and tip actually comes from two of my favorite political philosophers: Mao Zedong and Mother Teresa — not often coupled with each other, but the two people I turn to most to basically deliver a simple point, which is, you're going to make choices; you're going to challenge; you're going to say, 'Why not?'; you're going to figure out how to do things that have never been done before."