(CNN) -- Defense Secretary Robert Gates, the lone holdover from the Bush administration, has decided to stay on the job for at least another year, a Pentagon spokesman said.
As secretary, Gates leads the Defense Department, which is in charge of providing the military resources needed to protect the United States.
In an interview with CBS last year, Gates described his job as a "very painful thing" and "not a job anybody should like."
After Barack Obama announced he wanted to keep Gates at the helm of the Pentagon when he became president, Gates admitted he "spent a long time hoping the question would never be popped."
Gates gave Obama his commitment to stay on the job for at least another year just before Christmas, said Geoff Morrell, the deputy assistant secretary of defense and Pentagon press secretary.
"They agreed to revisit this issue again later this year, but for all intents and purposes, their original agreement still stands: He [Gates] serves at the pleasure of the president indefinitely, and he is honored to do so, though he certainly looks forward to one day retiring to his family home in the Pacific Northwest," he said.
Even though some have considered Gates to be a "short-timer" with Obama, Michael O'Hanlon, a national security expert at the Brookings Institution, said it should come as no surprise that Gates signed on for another year.
"Gates is very serious about his job. To leave at this moment ... would have been to leave right in the middle of the adoption of the new strategy for Afghanistan," he said. "It would have felt like a handoff in midseason."
Morrell said there was a misperception that Gates had agreed to stay for only a year.
"If you go back and look at it, it was always described as 'open-ended.' There were always rumors in Washington that it was somehow a yearlong agreement," Morrell said. "These are sort of bite-sized portions, a year at a time, and he's committed to another year. ... And at the end of this year, I'm sure they will look at it again."
Gates played a key role in shaping the president's recently announced strategy for the war in Afghanistan, one that requires sending 30,000 more troops to the region in the first half of this year.
"I think he feels the weight of a lot of responsibly and the burden of a lot of tragedy," O'Hanlon said. Since 2001, 939 Americans have died in the war on terror, and since 2003, 4,376 have died in Iraq, according to CNN's count.
Speaking at a 2008 graduation at the U.S. Military Academy at West Point, Gates choked up as he told the cadets, "I feel personally responsible for each and every one of you, as if you were my own sons and daughters."
With the United States engaged in two unpopular wars, this year has been a trying one for the defense secretary. Gates fired the top commander in Afghanistan, bringing in Gen. Stanley McChrystal to replace Gen. David McKiernan. He asked for McKiernan's resignation, citing a need for "new thinking and new ideas" in Afghanistan.
In addition to helping craft the strategy in Afghanistan, he also worked to reshape the Defense Department's budget.
Gates announced major priority shifts last year, moving funds toward weapons the U.S. military is using and away from research and weapons that may be used in future conflicts. Among other things, Gates called for production of the Air Force's most expensive fighter, the F-22 Raptor, to be phased out by fiscal year 2011.
Gates took over the Defense Department in December 2006, when President George W. Bush nominated him as the nation's 22nd secretary of defense. He replaced Donald Rumsfeld, one of the architects of the Iraq war.
"I think he is about as a good of a secretary as we've ever had on the job, and the reason is because of his focus and the seriousness with which he pursues the position. And for that reason, he doesn't enjoy it, but he does it diligently and with great resolve," O'Hanlon said.
"I think he's seen still very well by virtually everyone, in and out of the building. And I think people realize just how sober and serious he is about his job," he said.
Gates was also a member of the Iraq Study Group that Bush appointed earlier to recommend a change of course in the Iraq war. He'd also served as deputy national security adviser to Bush's father during the Gulf War in 1991, and was the youngest person ever to lead the CIA.
In 2005, he turned down Bush's offer to be the director of national intelligence, opting to stay on board as the president of Texas A&M University. In accepting the offer to lead the Department of Defense, Gates said, "I love Texas A&M deeply, but I love our country more."
His position at the university was the best job he'd had, Gates said, even though he served in six presidential administrations.
CNN's Chris Lawrence, Mike Mount and Barbara Starr contributed to this report.