"We categorically condemn any action that desecrates a national symbol of any country, in this case of Turkey," the ministry said in a tweet.
Angry Greek protesters set a Turkish flag on fire in the Aegean Sea port of Thessaloniki on Friday in response to the first Muslim prayer held in the landmark Hagia Sophia in nine decades.
The Foreign Ministry said Turkey's move fomented religious and cultural divisions. A Turkish Foreign Ministry spokesman lashed back, saying this kind of rhetoric had encouraged the Greeks to burn the flag.
It was converted into a mosque after the Ottoman conquest in 1453 and became a museum under Turkey's secular leader Mustafa Kemal Ataturk in 1934. That status was revoked by a Turkish court in July this year, with President Recep Tayyip Erdogan decreeing that Hagia Sophia would become a mosque once again.