WASHINGTON - General David Petraeus warned against sacrificing US military capabilities to ease America's budget woes, as he retired from the Army on Wednesday ahead of becoming CIA director.Petraeus, 58, rose through the ranks to become arguably the US military's brightest star, credited for helping to turn around the Iraq war and for helping to halt the momentum of Taliban militants in Afghanistan. He led US troops in both conflicts and briefly oversaw the entire the region as head of the US military's Central Command.At the CIA, Petraeus will replace Leon Panetta, who became US defense secretary. He will be sworn in on Sept. 6.Petraeus acknowledged he was leaving the US military at a delicate moment, as the Pentagon seeks ways to cut some $350 billion over the next decade. Some lawmakers want even deeper cuts, which top brass warn will affect missions the military can carry out."As our nation contemplates difficult budget decisions, I know that our leaders will remember that our people, our men and women in uniform are our military," Petraeus said, adding that "taking care of them and their families must be our paramount objective."He also warned it was important to maintain the "versatility and flexibility" developed during the past decade of counter-insurgency conflicts.Petraeus said that the Sept. 11, 2001 attacks, which triggered a decade of war, were a reminder that "we don't always get to fight the wars for which we are most prepared, or most inclined.""Given that reality, we will need to maintain the full-spectrum capability that we have developed over this last decade of conflict in Iraq, Afghanistan or elsewhere," he said.