Ireland's leader Leo Varadkar casts his vote at a polling station in Castleknock, Dublin on February 8, 2020.
CNN  — 

Irish leader Leo Varadkar has told parliament that he will resign on Thursday night, after suffering a crushing defeat in a parliamentary vote. No clear successor has emerged from the process to lead the country.

Varadkar said he would stay on as caretaker leader after he tenders his resignation to Irish President Michael D. Higgins.

Ireland had been in political deadlock since general elections on February 8 ended with no single party winning a mandate to govern. On Thursday, newly elected representatives in parliament voted on candidates for the next taoiseach, equivalent to a prime minister.

The winner would have needed 80 votes to take the top seat.

Incumbent Varadkar won just 36, with support from all lawmakers in his own party Fine Gael, plus one more. Fine Gael currently leads a minority government propped up in a confidence-and-supply arrangement with republican party Fianna Fáil.

Micheál Martin, the Fianna Fáil candidate, received 41 votes. He could potentially end up leading the country if he can gain the support of Fine Gael.

It was Mary Lou McDonald, leader of the republican Sinn Fein party, who won the most votes, gaining 45. But both Fine Gael and Fianna Fáil have ruled out a coalition or partnership with Sinn Fein, which was historically the political wing of the IRA.

Earlier in the month, Sinn Fein managed to attract a historic level of support in the general election by campaigning on a platform to address problems with housing affordability and issues with the healthcare system.

Varadkar was elected leader of Fine Gael in 2017, in a historic vote that propelled the former doctor to become the country’s first openly gay taoiseach, as well as its youngest and the first with an ethnic minority background.

He was seen as a symbol of a fast-liberalizing Ireland, overseeing the country’s relaxation of its strict anti-abortion laws just years after Ireland legalized same-sex marriage.

CNN’s Sarah Dean contributed to this report.