Streets and buildings in Turkey's second-largest city, including army barracks, were covered in a sea of red Turkish flags and portraits of Mustafa Kemal Ataturk, the founder of modern Turkey.
"Unfortunately deep political crises have heavily stormed the political atmosphere in Turkey"
Mulukan, Ankara, Turkey
Send us your views
"Turkey is secular and will remain secular," protesters chanted. "No to sharia [Islamic law]."
Local police told Reuters that at least a million people attended the seaside rally, with no serious incidents reported.
Turkey's main opposition centre-left Republican People's Party (CHP) and the smaller leftist Democratic Left Party (DSP), which are in talks to form an alliance, hope to use the rally to build momentum before elections on July 22.
The government of Tayyip Erdogan, the prime minister, has called a general election months ahead of schedule to defuse a conflict with Turkey's secularists over a presidential election.
Turkey's secular elite, including opposition parties, senior judges and army generals, successfully blocked the election of Abdullah Gul, the foreign minister.
They feared that Gul might try to undermine Turkey's separation of state and religion, a claim he and his ruling AK Party strongly deny.
The political crisis has brought about mergers between opposition parties in the hope to pass a 10 per cent threshold of votes in July to enter parliament.
Opinion polls show the centre-right AK Party is likely to win most votes in July but it may fail to win an outright majority, forcing it to form a coalition government.
A series of large anti-AK Party rallies over the past month have again brought to the surface the great divide among Turks, who are predominantly Muslim, over the role of religion amid fast economic and social change.
Izmir, a transit point for Turkey's tourism industry, has traditionally been predominantly secular and pro-western.