The mammoth protest – organized by the opposition Republican People’s Party, or CHP – was a rare display of public dissent in a country where tens of thousands have been jailed as part of a systematic post-coup purge of dissidents and other government opponents. Even small demonstrations in central Istanbul have often been met with a harsh police response.

But Sunday’s rally, which organizers claimed drew more than 1 million people, marked a triumphant end to a march started by opposition leaders in Ankara three weeks ago.

The lawmakers and others walked from the capital, Ankara, to Istanbul’s seaside – a journey of about 280 miles. That walk, led by the mild-mannered CHP leader Kemal Kilicdaroglu, ended up breathing new life into an opposition that just months ago was on the verge of irrelevance.

Kilicdaroglu, in an uncharacteristically fiery speech Sunday, called the rally a “new step, a new history, a new birth.” He read out a list of demands for the government of President Recep Tayyip Erodgan, including “giving parliament back its authority” and “releasing jailed lawmakers and journalists.”

In April, Kilicdaroglu failed to mount a successful challenge as a referendum on constitutional amendments granted sweeping powers to Erdogan. Last year, Kilicdaroglu voted along with the president’s party to lift lawmakers’ immunity from prosecution. That move was unpopular among his supporters. But in recent weeks, Kilicdaroglu has inspired ordinary Turks to join his march and voice their concerns about the direction of the country.

Turkey’s political woes have percolated for years, buffeted by a homegrown ethnic Kurdish insurgency and spillover from the Syrian civil war next door.

Amid the chaos, Erdogan, an Islamist once lauded as one of the few democratic leaders in the region, began exhibiting authoritarian tendencies.