A six-party alliance has nominated Kemal Kilicdaroglu as its joint candidate to challenge President Recep Tayyip Erdogan in Turkey’s presidential election in May, ending months of uncertainty and bickering that had frustrated their supporters.

The country is heading for crucial presidential and general elections on May 14 that could shift the country toward a more democratic course or extend Erdogan’s increasingly authoritarian rule into a third decade.

The election is Erdogan’s toughest of his 20-year rule and comes amid economic turmoil and criticism of the government’s response to a devastating earthquake last month.

“Our biggest goal is to bring Turkey towards prosperous, peaceful and happy days,” Kilicdaroglu said after he was nominated, as thousands of supporters cheered.

The process of deciding on a unified candidate has not been easy. Meral Aksener, who leads the nationalist Iyi party, broke away from the alliance on Friday, due to Kilicdaroglu’s candidacy. Her split from the alliance had been seen as a major boost for Erdogan.

Aksener, a former interior minister whose party is the second largest in the opposition bloc, was reported to have favored one of the popular mayors of Istanbul or Ankara over Kilicdaroglu.

Officials said she returned to the alliance after a compromise was reached in which Istanbul Mayor Ekrem Imamoglu and Ankara Mayor Mansur Yavas would be nominated as vice presidents.

Click the video above to see more.