Erdogan was getting into a car after receiving a cultural cooperation award at the city hall late Monday. The 27-year-old man hurled a shoe at the prime minister, shouting “Kurdistan”.
The shoe hit Erdogan's car instead of the premier, and was picked up by his bodyguards. The Syrian national had been living for at least a year in Seville, where the authorities were due to decide whether to expel him or legalize his situation, according to police sources. The man could now be charged with attacking a head of state and with resisting police.
Another person was also detained at the hotel where Erdogan was staying on charges of calling the premier a murderer and shouting: "Free Kurdistan!"
The man was identified and later released. He was of Kurdish origin and was believed to know the man who threw the shoe.
Erdogan arrived in Seville from Madrid, where he held talks with Spanish Prime Minister Jose Luis Rodriguez Zapatero on Monday.
The shoe attack coincided with the arrests in Turkey of 49 people in connection with a plot to overthrow the government.