Washington (CNN) Former CIA Director Leon Panetta said Monday it was inappropriate for President Donald Trump to use his speech to the agency as an opportunity to complain about reports on the crowd size at his inauguration.

"I just got the impression when he was speaking there, that somehow, he forgot that he was President of the United States and was speaking to the intelligence officers that spend their lives trying to serve this country. That was not the appropriate place to start whining about what was happening in terms of numbers in the inauguration," Panetta told CNN's Wolf Blitzer on " The Situation Room" Monday.

Panetta: I got the impression when Trump was speaking at the CIA that he somehow forgot he was president https://t.co/vLccFQgyT8 — The Situation Room (@CNNSitRoom) January 23, 2017

Trump had stopped at CIA headquarters Saturday to deliver the speech in front of the CIA Memorial Wall where fallen operatives are remembered.

"That wall contains the stars of CIA officers who have given their life to this country. That's about as close as you can get to hallow ground at the CIA. It's the equivalent of speaking at Arlington Cemetery," Panetta said.

Trump had told the CIA: "There is nobody that feels stronger about the intelligence community and the CIA than Donald Trump, there is nobody."

Read More