Telugu Desam Party chief N Chandrababu Naidu resigned as the chief minister of Andhra Pradesh on Thursday evening after his party showed leads in only 23 of 175 Assembly seats of the state after nearly 12 hours of counting.

The YSR Congress Party was leading in 135 and won 14 of 175 seats as of 7.45 pm. The party, led by YS Jaganmohan Reddy, also won 22 of 25 Lok Sabha seats in the state, which voted in both national and state elections simultaneously on April 11.

Jaganmohan Reddy is likely to take oath on May 30, ANI reported. Prime Minister Narendra Modi congratulated him on the “remarkable” win, and wished him a successful tenure, PTI reported.

Naidu’s Telugu Desam Party had ruled the state since 2014, when the new state of Telangana was carved out of Andhra Pradesh. The 2019 Assembly elections were the first after the bifurcation.

YSR Congress Party leader Ummareddy Venkateswarlu told ANI that voters have confidence in party chief Jaganmohan Reddy to lead the state. “Looking at the loot by N Chandrababu Naidu, the public doesn’t want him to rule the state,” he said.

Jaganmohan Reddy is the son of YS Rajashekhara Reddy, a popular chief minister of the state who had died in a helicopter crash in September 2009. He parted ways with the Congress about a year later and floated the YSR Congress Party in 2011.

Reddy thanked citizens for voting for his party in the Assembly and Lok Sabha elections. “I also thank them for exercising their franchise in large numbers and enhancing the value of democracy,” he said, according to The Indian Express. “I will live up to the expectations of the people.”

Telangana Chief Minister K Chandrashekar Rao, who is popularly known as KCR, congratulated Reddy on his victory in Andhra Pradesh, reported IANS.

Naidu was banking on his welfare schemes and promises of development to ride back into power. He had also taken the lead in forming an alliance of Opposition parties at the national level over the last few weeks. Reddy relied on his push for the special category status for Andhra Pradesh. His over 3,000-km walk during his campaign, in which he visited thousands of villages, was seen as a big hit in the state.

Exit polls for the 2019 elections had shown mixed predictions for the Telugu Desam Party and the YSR Congress Party.