The United States Air Force said Thursday that there is nothing wrong with troops getting “Make America Great Again” hats signed by the president, countering a media narrative about potential misconduct.

During an unannounced visit to U.S. military bases in Iraq and Germany the day after Christmas, President Donald Trump snapped photos with and signed memorabilia for U.S. service-members.

A member of the US military holds up a "Make America Great Again" hat as US President Donald Trump and First Lady Melania Trump greet members of the US military during a stop at Ramstein Air Base in Germany, on December 27, 2018. - President Donald Trump used a lightning visit to Iraq -- his first with US troops in a conflict zone since being elected -- to defend the withdrawal from Syria and to declare an end to America's role as the global "policeman." (Photo by SAUL LOEB/AFP/Getty Images)

CNN, The Washington Post and The New York Times seized on photos of U.S. Army and Air Force members holding “Make America Great Again” hats and suggested that the military members were breaching protocol by getting the president to sign them. (RELATED: Newsweek And Others Claim Without Evidence That Trump ‘Outed’ A ‘Covert’ SEAL Team) 

The media’s criticism largely centered on a military policy that prevents active duty military from engaging in “partisan political activities,” despite the fact that the president is not currently a political candidate and was not engaging in campaign activity during his visit.

U.S. Air Forces Europe made clear in a statement Thursday that troops at Ramstein Air Base did not break any rules by bringing their own hats for the president to sign.

“There is no rule against Airmen bringing personal items to be signed by the president,” USAFE said, noting that while troops held the hats to be signed, they never wore them while in uniform.

“Any time the commander in chief offers the opportunity to meet with Airmen, such as this official holiday visit by the President and First Lady, Airmen are welcome to participate,” USAFE continued. “No policy violations have been brought to our attention at this time.”

The U.S. Army has not released a similar statement about alleged violations during Trump’s visit to Al Asad Air Base in Iraq.