A heavily armed Libyan man opened fire at one of Istanbul's main tourist attractions on Wednesday, wounding a Turkish soldier and a security guard before police snipers killed the attacker, officials said.
The motive for the assault at Topkapi Palace was not immediately known but police said the man had entered Turkey only three days ago.
Turkey supported the popular uprising that defeated Moammar Gadhafi's regime.
Police also said the attacker arrived at the scene in a car with Syrian license plates.
Minutes before the attack, Turkey's Foreign Minister Ahmet Davutoglu had announced tough economic sanctions on Syria to protest its government's crackdown on an 8-month-old pro-democracy uprising.
Multiple gun shots were heard from behind the high walls of the Topkapi Palace before the attacker was killed, and some tourists threw themselves on the ground to avoid the violence, officials and witnesses said.
Topkapi Palace, the seat of the Ottoman sultans for almost 400 years, is located in the city's historic Sultanahmet district, which also includes the Blue Mosque and the former Byzantine church of Haghia Sophia.