Washington (CNN) -- President Obama has agreed to waive a Pentagon rule and let outgoing Gen. Stanley McChrystal retire at his full four-star rank, a White House spokesman said Tuesday.
While the general is short of the time needed to retire at his current pay grade, White House spokesman Robert Gibbs said Obama would ensure he keeps his rank as he steps down.
"The president believes and has talked with Secretary Gates about this, and we will do whatever is necessary to ensure he, somebody who has served the country as he has, can retire at a four-star level," Gibbs told reporters.
McChrystal resigned as the top U.S. commander in Afghanistan last week after he and his staff were quoted in a Rolling Stone magazine article criticizing and mocking key administration officials, and he announced Monday that he would retire from the Army.
A senior Pentagon official told CNN that he would have to have held his rank for three years before qualifying for full retirement benefits -- but Obama is waiving that requirement because of McChrystal's many years of "honorable service," the official said.
McChrystal was promoted to four-star rank and assigned to command of the Afghan war in June 2009. Before that, he led U.S. military counterterrorism operations as chief of the Pentagon's joint Special Operations Command.
CNN Pentagon correspondent Barbara Starr contributed to this report.