Turkey's Erdogan rejects criticism over Hagia Sophia landmark
"Charges against our country over Hagia Sophia are a direct attack on our right to sovereignty," Erdogan said.
Turkey's highest administrative court is considering whether the emblematic site and former cathedral can be redesignated as a mosque, prompting US Secretary of State Mike Pompeo on Wednesday to urge Turkey to keep the site in its current status as a museum.
The Council of State convened on Thursday to evaluate the case brought by an association to change the museum's status.
The court, known as Danistay in Turkish, must announce its decision within 15 days.
Hagia Sophia was first constructed as a cathedral in the Christian Byzantine Empire in the sixth century but was converted into a mosque after the Ottoman conquest of Constantinople in 1453.
Transforming it into a museum was a key reform of the post-Ottoman authorities under the modern republic's founder Mustafa Kemal Ataturk.
But calls for it to serve again as a mosque have led to anger among Christians and tensions between historic foes and uneasy NATO allies Ankara and Athens, which closely monitors Byzantine heritage in Turkey.
Erdogan said last year it had been a "very big mistake" to convert the Hagia Sophia into a museum.