[cnn-photo-caption image= http://i2.cdn.turner.com/cnn/2009/images/10/10/art.bocraig1009.gi.jpg caption="In the first major shakeup among President Barack Obama's senior staff, White House Counsel Greg Craig announced his resignation Friday."]WASHINGTON (CNN) - In the first major shakeup among President Barack Obama's senior staff, White House Counsel Greg Craig announced his resignation Friday.
The resignation will take effect on January 3, according to a letter sent by Craig to Obama.
Craig is being pushed out in favor of veteran Democratic lawyer Bob Bauer because of a dispute over plans to close the U.S. military prison in Cuba, CNN learned Thursday.
"I want to tell you how proud I am of all that your legal team has accomplished on your behalf," Craig wrote in the letter. "It has been a busy first year (for the administration), and I feel very lucky to have been part of it."
The move was announced while the president was in Japan at the start a four-nation tour of Asia.
Craig declined to comment and hung up when reached by CNN late Thursday evening.
Bauer is the husband of Anita Dunn, the outgoing White House communications director. Dunn, who recently led a so-called "war" on Fox News, announced earlier this week that she is leaving her White House post, a long-anticipated move that was not connected to the media battle.
Democratic officials said Craig was ousted because of frustration among senior White House aides over his handling of the plans to close the prison at Guantanamo Bay. As the White House's top lawyer, Craig was pivotal in advising Obama to sign an executive order during his first week in office promising to shut the prison by the end of January 2010.
In a politically embarrassing move that has frustrated some of the president's liberal supporters, White House aides have since backed off that deadline, citing complex legal issues surrounding what to do with the approximately 200 terror suspects still detained at Guantanamo.
Some administration officials privately believe Craig should have better anticipated the pitfalls. However, his supporters believe he is being used as a scapegoat and note he was not the only top official who supported the ironclad executive order.
In his resignation letter, Craig highlighted his work developing "a legal framework that will deal with threats to our national security in such a way as to protect our nation from harm while remaining true to our most fundamental values."
One Democratic official acknowledged Craig's tenure had been a "little choppy," but downplayed the exit as part of the normal turnover in any administration after nearly one year in office.
Craig was one of the lawyers defending then-President Bill Clinton during his impeachment trial. He became an early and active supporter of Obama in the Democratic presidential primaries, angering backers of then-Sen. Hillary Clinton. That is one of the reasons why allies of Craig are frustrated he is being replaced so early in the administration.
But Democratic sources said Craig never clicked with senior White House aides, and Bauer is a low-key, behind-the-scenes operator more in Obama's comfort zone.
Bauer was the chief attorney during the campaign, and will be leaving the law firm of Perkins Coie, a Seattle-based firm that has an office in Washington, D.C.
There has been speculation that administration officials have been trying to find a federal judgeship or ambassadorial post for Craig, but Craig said in his letter that he intends to return to private practice.
Craig previously worked at the Washington law firm of Williams & Connolly.
- CNN's Ed Henry contributed to this report