Erdogan spotted the weeping-and-saluting 6-year-old Amine Tiras while delivering a speech at his ruling party's congress in the city of Kahramanmaras on Saturday, and had her brought on stage.
After trying to comfort the girl by kissing her on both cheeks, Erdogan told the crowd: "She has the Turkish flag in her pocket. If she becomes a martyr, God willing, this flag will be draped on her."
- Syrian-Turkish Standoff Nears as pro-Assad Forces Enter Kurdish-held Enclave
- Turkey Shells Kurdish-held Region in Syria as Assad Loyalists Arrive
- Turkey Deploys Special Forces to Syria's Afrin in Escalation Against the Kurds
Some people were appalled and took to Twitter to criticize the president.
One user said it was the state's duty to protect children, not to "kill" them.
Another said: "you don't wish death for a child, you never say: 'God willing.'"
His action comes as nationalist sentiment is running high over a Turkish cross-border military offensive against Syrian Kurdish fighters that are affiliated with Kurdish rebels fighting inside Turkey.
In recent weeks, children dressed in commando uniforms or reciting nationalist poems have been making appearances in many events that he attends.
Yasar Okutan, a former government minister, accused Erdogan in a television interview of using them to increase votes in presidential and local elections in 2019 and questioned whether the president would say the same for his own granddaughter.