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,” AP reported.

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,”

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.