In his first public appearance since a crushing defeat in a rerun election for mayor of Istanbul, Turkish President Recep Tayyip Erdogan on Tuesday vowed to draw lessons and make adjustments in line with "the messages given by the people."

Addressing legislators from his ruling party in Parliament, Erdogan again congratulated opposition candidate Ekrem Imamoglu who garnered 54.21% of the vote in Istanbul on Sunday to become Istanbul's mayor. Erdogan had previously congratulated Imamoglu in a tweet.

Sunday's results came as a rare electoral defeat for Erdogan and broke the Islamic-leaning ruling party's decades-old grip on Turkey's most important city. It was also a personal blow to Erdogan whose rise in Turkish politics had started with his own election as Istanbul mayor 25 years ago.

"In line with our political understanding, we cannot be angry or hold a grudge or blame the people," Erdogan told his party's legislators. "We don't have the luxury of turning a deaf ear and ignoring the messages given by the people,"

TURKEY SEES POLITICAL TENSION AFTER ERDOGAN'S OPPOSITION WINS IN ISTANBUL

He said his ruling party, which is scheduled to meet later Tuesday, would determine its "failings, disunity and errors" and look for ways to fix them.

In a related development, Erdogan in his speech marked the anniversary of last year's electoral win that also ushered in a new political system by abolishing the office of the prime minister and vastly expanded the powers of the president. Critics say the system has eroded democracy and paved the way to one-man rule.

Erdogan said the people and country had "accepted" and "adjusted" to the new system but stated that a committee led by Vice President Fuat Oktay, would nevertheless be formed to assess possible shortcomings.

Hours later, Kemal Kilicdaroglu, who leads the main opposition party that backed Imamoglu, called for the new presidential system to be scrapped.

"Let's lift this one-man regime and build a democratic system," Kilicdaroglu said in a speech in Parliament.

Speaking to journalists on his way out of parliament, Erdogan wouldn't rule out a Cabinet reshuffle following Sunday's defeat.

"If one is needed we will do it, but we won't take an order," Erdogan said.

CLICK HERE TO GET THE FOX NEWS APP

Sunday's repeat election in Istanbul was held after the ruling party challenged the first vote over alleged irregularities, and Turkey's electoral board nullified the results and revoked Imamoglu's mandate after 18 days. Imamoglu won by around 800,000 votes more than his rival, compared with a 13,000-vote margin in the first vote.

The win electrified the secular party that has been spent nearly two decades in lackluster opposition as Erdogan strengthened his hold on power. The opposition also gained hold of the municipality of the capital, Ankara, in the March 31 local elections.