Major Gen. Peter Fuller, a top U.S. commander in Afghanistan, was relieved of his duties Friday after making comments critical of Afghan President Hamid Karzai, a senior U.S. defense official said.

Gen. John Allen, commander of the International Security Assistance Force, relieved Fuller as deputy commander of the effort to train Afghan security forces after Fuller told the Politico newspaper that Afghan leaders were isolated from reality, the official said.

Pentagon spokesman George Little told reporters earlier Friday that Defense Secretary Leon Panetta was aware of the remarks and that Fuller had been speaking for himself and not the Defense Department.

The secretary has full trust and confidence in General Allen's judgment with respect to his decision in this case, Little said in response to Allen's decision to relieve Fuller of his duties.

Speaking in a Politico interview that ran on Thursday, Fuller depicted Afghan officials as detached and unappreciative of American sacrifices and financial contributions to Afghanistan after 10 years of war.

The interview also depicted Fuller as critical of Karzai's recent comments suggesting that Afghanistan would side with Pakistan if it went to war with the United States.

Why don't you just poke me in the eye with a needle! You've got to be kidding me -- I'm sorry, we just gave you $11.6 billion, and now you're telling me, 'I don't really care?'

The interview also quotes Fuller as saying Afghanistan did not recognize the sacrifice in treasure and blood the United States was making for its security.

It is not first time the tenure of an American general has ended abruptly under a similar cloud.

In July 2010, President Barack Obama fired Gen. Stanley McChrystal, then commander of U.S. and NATO forces in Afghanistan, over remarks he and his aides made in an explosive Rolling Stone magazine article that disparaged the president and other civilian leaders.

While Fuller's job was far less senior than McChrystal's, the training of Afghan security forces has become an increasingly central part of NATO's mission in Afghanistan as foreign forces gradually seek to put Afghan soldiers and police in charge of security.

Afghan security forces are better skilled and far more numerous than they were, but they still suffer from inadequate fighting skills, subpar equipment, and widespread illiteracy.

While Obama plans to remove the 33,000 extra troops he sent following a 2009 review of Afghan war strategy, security conditions remain troubling. The United Nations says violence is at its worst level since the war began in 2001.

(Reporting by David Alexander; Additional reporting by Missy Ryan; Editing by Peter Cooney)