A new parliament will now choose a president after a July 22 poll.
President Ahmet Necdet Sezer will stay on as interim head of state.
The opposition boycotted two rounds of voting on Foreign Minister Abdullah Gul's candidacy, saying Turkey's secular state was at risk through encroaching Islamization.
(Reuters)