The former top US commander in Afghanistan who was fired over disparaging comments about President Barack Obama and his civilian advisers received a hero's send-off from Pentagon and Afghan leaders at a retirement ceremony on Friday. 'My service did not end as I would have wished,' General Stanley McChrystal conceded in a farewell speech in which he spoke publicly for the first time about the scandal, expressing gratitude for his military career and cracking jokes about his downfall and future, reported Reuters. The ceremony, which included a musical salute by the Army Band, came just a month after McChrystal was summoned to the White House where an angry Obama fired the general who had spearheaded his revised war strategy in Afghanistan. Smoke drifted across grass-covered parade grounds lined with soldiers at attention as the four-star general received a deafening 17-gun salute. 'We bid farewell to Stan McChrystal today with pride and sadness,' said Defense Secretary Robert Gates, who flew back from Asia to see the general off at Fort McNair in Washington.In attendance were dozens of officials, including Afghanistan's ambassador to the United States, a reflection of McChrystal's good standing within the military and Afghan government despite the scandal over comments he and his aides made to a reporter from Rolling Stone magazine. 'You laid the foundation for our final triumph,' the ambassador, Said Tayeb Jawad, told the crowd. 'We will remember you for generations.' Gates called the retiring general 'one of the finest men at arms this country has produced,' and credited him with carrying out Obama's orders in Afghanistan with devotion. In the Rolling Stone piece, McChrystal made belittling remarks about Vice President Joe Biden and the US special envoy to Afghanistan and Pakistan, Richard Holbrooke. His aides were quoted calling White House national security adviser Jim Jones a 'clown,' and saying the president appeared intimidated and disengaged at an early meeting with McChrystal. 'There are misperceptions about the loyalty and service of some dedicated professionals that will likely take some time but I believe will be corrected,' McChrystal said without elaborating. 'Look, this has the potential to be an awkward or even a sad occasion. With my resignation, I left a mission I feel strongly about. I ended a career I loved that began over 38 years ago. And I left unfulfilled commitments.' He said he was proud of his accomplishments. 'To those here tonight who feel the need to contradict my memories with the truth, remember I was there too, I have stories on all of you, photos on many and I know a Rolling Stone reporter,' he quipped.