Recep Tayyip Erdogan became the first Turkish president to visit the Pope in the Vatican in nearly six decades on Monday.
Rome was put under tight security for fear of violent demonstrations, notably over Turkey's military offensive in Syria.
And at least two people were detained when protesters tried to break through cordons from an authorised protest nearby.
Returning a visit made by the pope to Turkey in 2014, Erdogan spoke privately with Francis for about 50 minutes in the pontiff's frescoed study in the Vatican's Apostolic Palace, which he uses mostly for ceremonial purposes.
A key talking point for the pair was the situation in the Middle East.
Both Erdogan and Pope Francis are opposed to US President Donald Trump's decision to recognise Jerusalem as the capital of Israel.
At the end of the private part of the meeting, the pope gave Erdogan a bronze medallion showing an angel embracing the northern and southern hemispheres while overcoming the opposition of a dragon.
"This is the angel of peace who strangles the demon of war," the pope told Erdogan as he gave him the medallion, made by the Italian artist Guido Verol. "(It is) a symbol of a world based on peace and justice."
Erdogan's motorcade entered a virtually deserted St. Peter's Square after the streets that are usually bustling with tourists were closed due to security fears.
An authorised demonstration of about 150 people including Kurds and their supporters outside nearby Castel Sant'Angelo, a fortress on the banks of the River Tiber, turned violent when police in riot gear pushed back shouting and shoving protesters who tried to break through their lines. At least one demonstrator was injured, a witness said.