DALLAS — President Trump insisted on Thursday night that he was smart to let Turkey attack America’s Kurdish allies in northern Syria, comparing the two warring sides to children on a playground who need to slug it out before settling their differences.

Speaking at a campaign rally hours after Vice President Mike Pence and Secretary of State Mike Pompeo brokered a cease-fire, Mr. Trump defended his decision to withdraw American forces from Syria, effectively clearing the way for a brutal Turkish assault on Kurdish fighters who had fought for years alongside the United States against the Islamic State.

The president’s decision to pull out drew rebukes from both Democrats and Republicans, who accused him of abandoning America’s friends. But Mr. Trump said the violence of the past week was useful. “It was unconventional what I did,” he acknowledged. “Sometimes you have to let them fight a little while. Sometimes you have to let them fight like two kids,” he added. “Then you pull them apart.”

While he has previously denied giving Turkey the green light to attack the Kurds, Mr. Trump implied on Thursday night that actually he had done so in order to persuade the two sides to come to terms. “Without a little tough love, they would never have made this deal,” he said.