President Obama has convinced Attorney General Eric Holder, a close friend, to remain on the job for at least part of his second term despite a recent contempt of Congress charge and calls by some lawmakers for his resignation amid the Operation Fast and Furious scandal.

More recently, questions have been raised about how Holder handled the information on ex-CIA Director David Petraeus' extramarital affair in the days before the election.

The embattled Holder, 61, seemed doubtful in recent days about whether he would stay for a second term, admitting to students on Nov. 8 at the University of Baltimore School of Law that the last four years had been tough.

Holder told the students he needed to "really ask myself the question about, do I think there are things that I still want to do? Do I have gas left in the tank?"

A loyal friend of the president, Holder has reportedly agreed to remain in office for about a year so that the administration would not be hit with a mass exodus of Cabinet members. Secretary of State Hillary Clinton, for instance, is set to depart in coming weeks, as is Treasury Secretary Timothy Geithner.

"This gives the president some stability within his Cabinet at a time when there is expected to be significant turnover," said Heritage Foundation legal scholar John Malcolm. "However, it also means that the Justice Department is going to continue to be headed by somebody who has been held in contempt ... and whose leadership abilities have been called into question through Operation Fast and Furious, the misleading responses that were provided to Congress in its wake, and the alleged retaliation against whistleblowers, and through some highly questionable, some would say political, decisions."

Holder enjoys a special relationship with Obama and is particularly important to the president's political survival, analysts said.

"The fact that Holder is controversial doesn't help Obama, but I'm guessing Obama likes to have an attorney general to whom he is extremely close," said Amy Moritz Ridenour, chairwoman of the National Center for Public Policy Research, a conservative advocacy group. "So, they trust each other and so, whatever comes up, Eric Holder's got his back."

Holder was found in contempt of Congress by a Republican-majority House in July for withholding from lawmakers thousands of pages of documents related to Fast and Furious, a secret government gun-running program that permitted the sale of American firearms to Mexican drug gangs. The Justice Department announced it would not pursue the contempt charge against Holder.

In recent days, Holder became the subject of criticism again after it was disclosed that he withheld from Obama information about Petraeus' affair until after the election.

Holder last week defended his decision not to inform Obama about Petraeus, saying it was unnecessary because the affair did not pose a national security threat.

Conservative critics of Holder question whether Holder did not tell Obama about the Petraeus affair to spare him from having to react to it or discuss it publicly before the election.

"What is going on at the Department of Justice now that Eric Holder can keep a lid on but a successor attorney general might not?" Ridenour asked.

The White House did not respond to a request for comment, and a Justice Department spokeswoman declined comment on Holder's decision.