Turkish President Recep Tayyip Erdogan appeared to spot the 6-year-old girl in the crowd, dressed in a miniature military uniform and standing at attention.

The girl took a deep breath and her bottom lip quivered as Erdogan addressed her during a speech to members of his ruling party.

“Look, look, look who’s over there! Girl, what are you doing here?” the president called out to the girl, who was saluting and appeared to be holding back tears.

“We have our Maroon Berets here,” he said of the Turkish special forces unit.

“But,” he told the child, “Maroon Berets never cry.”

She eventually started to cry and wipe her eyes.

Erdogan had the girl brought onstage in the arena in Kahramanmaras. She was later identified by the Associated Press as Amine Tiras. But in that moment, broadcast on live TV, she was an anonymous child whimpering into the microphone.

“She has the Turkish flag in her pocket,” Erdogan said.

Then, he added, “If she becomes a martyr, God willing, they will drape the flag on her. She is ready for everything.”

The crowd cheered.

Reaction was less favorable on social media, where some users called Erdogan “evil” and even compared him to Adolf Hitler.

“Dictators are always using innocent children for their war propaganda,” one Twitter user wrote.

“Turkish President Erdogan tells a sobbing girl in military uniform that she would be honoured if killed while fighting,” Andrew Stroehlein, European media director for Human Rights Watch, tweeted. “Glorifying children’s deaths? Promoting child soldiers? Sick.”

Erdogan has posed for photos with children in military gear in the past.

The AP reported that children in uniform have been showing up at his recent events amid a military offensive against U.S.-backed Kurdish fighters in Syria.

Just last week, a photo showed the president saluting alongside children in parliament in Turkey's capital.

As The Washington Post's Erin Cunningham reported last month:

Turkey sees the Syrian Kurdish fighters as linked to insurgents fighting for Kurdish autonomy at home. Washington, meanwhile, has turned to the Syrian Kurds as a proxy force against the Islamic State and a bulwark against efforts by the extremists to reclaim territory.

“We are determined. Afrin will be sorted out," Erdogan said last month, referring to a city in northern Syria.  "We will take no step back.”

Erdogan salutes with children in commando uniforms in Ankara. (Burhan Ozbilici/AP)

Erdogan stands with Amine Tiras. (Murat Cetinmuhurdar/Pool/AP)

Read more:

Turkey's Erdogan vows to press offensive on U.S.-backed Kurds in Syria