To his many fans in Europe and the outside world, Irish Prime Minister Leo Varadkar is a kind of a pop star politician — in his well-cut suits, with his gay partner by his side, he is a symbol of a young, socially liberal, dynamic Ireland.

And yet as the Republic of Ireland goes to the polls for a general election Saturday, Varadkar and his party are struggling.

Varadkar became Ireland’s youngest-ever leader when he took office in June 2017, at age 38. A former doctor, born in Dublin of mixed Irish-Indian heritage, he’s also Ireland’s first gay leader.

He once represented change. But maybe not today.

In pre-ballot opinion surveys, Varadkar is facing a surge by the rejuvenated republican Sinn Fein party, which is pushing a popular left-wing social spending spree, and not shy about its ultimate goal, which is to see Northern Ireland quit the United Kingdom and join the Republic of Ireland as one nation, north and south, one day.

Pollsters, voters, politicians and analysts say Varadkar is in many ways a victim of Ireland’s successes.

He and his centrist Fine Gael party helped steer Ireland through historic change: The country rejected appeals by the Catholic Church and ended its ban on abortion in 2018 — what the prime minister called “the culmination of a quiet revolution.” Ireland also was the first nation to legalize by popular vote same-sex marriage, in 2015.

Having weathered a brutal banking crisis and global recession a decade ago, the Irish economy is now zipping along. Although Brexit could have threatened that growth, and the republic’s trade relationship with Northern Ireland and the European continent, Varadkar played hardball, outmaneuvering British Prime Minister Boris Johnson and winning a guarantee that there would be no border on the Irish island.

In a direct personal appeal to the Irish voters in the closing days of the campaign, Varadkar said: “I remember 2010. We were told that our futures were lost. I remember the mass unemployment, the dole queues, people emigrating. Empty main streets, our country humiliated on the world stage.”

He alluded to a bailout by the International Monetary Fund back then, which sparked austerity budgets, higher taxes and cuts in services. Varadkar thanked the country for its hard work and sacrifices. “We’re in so much a better place now than we were then,” said the prime minister, called the taoiseach in Irish.

As part of its transformation, Ireland invested heavily in the future, in pharmaceuticals, medical devices and tech. The country serves as European headquarters for Google, Facebook, Airbnb, LinkedIn and Microsoft. It now boasts the second-fastest-growing economy in the European Union, after tiny Malta. Unemployment is 4.8 percent, a 13-year low. With a surge in corporate tax receipts, the government is running a surplus.

Dublin is booming. But with its newfound wealth has come social stress. Housing prices and rents have skyrocketed, which means young Irish, even with university degrees, despair that they will never be able to buy their own homes.

Social media is full of posts mocking the tiny “room shares” available — a toilet, a stove, a bed — for thousands of euros a month.

It’s not just “generation rent” complaining.

Wait times for doctor’s appointments and hospital beds doubled, then tripled. The construction of a new hospital in Dublin is behind schedule and over budget. Because many Irish have to pay upfront for medicines and doctor’s visits, health care is the most important issue for 40 percent of voters, according to a January poll by the Irish Times.

Gross domestic product has soared, but so have tax bills. Pensioners are in revolt after the government floated plans to extend their state retirement dates to age 68 by 2028.

Varadkar and Fine Gael wanted the election to be all about their management of the economy and Brexit, but the voters are focused on health care and housing.

“They are lagging because the issues they want to campaign on are not issues resonating with the public,” said David Farrell, a professor of politics at University College Dublin.

Experts were surprised by Sinn Fein’s jump in pre-election opinion polls.

“None of us anticipated it,” Farrell said. “The working-class vote and youth vote feel the neoliberal agenda is leaving them behind, so that manifests itself as a vote for change.”

In other countries, this has seen citizens move to the populist right, but not in Ireland’s case. “In Ireland, it’s a swing to the populist left, and Sinn Fein are capturing that vote,” Farrell said.

Varadkar says he hears the public. In a campaign ad, the prime minister said, “Now that we have fixed the economy, we have the money to invest in health care and housing that we didn’t have before.” But after his party has had years in power, many aren’t convinced.

Sinn Fein has undergone its own transformation. Historically it was associated with the Irish Republican Army, which fought in Northern Ireland’s long, bloody “Troubles.” But the republican party is fully committed to pursuing Irish unity using democratic means. And the more time that passes since the IRA’s armed campaign, the more willing people are to support Sinn Fein.

Longtime leader Gerry Adams remains a central figure.

“Everyone is talking about Irish unity, except the government,” Adams, 71, said on the campaign trail. “Now is the time to start planning for Irish unity so that we can reap the economic benefits of a united Ireland. Our final mission will be to secure a referendum, north and south on Irish unity, and win it for the people of Ireland.”

But Adams officially stepped aside two years ago, replaced by Mary Lou McDonald, 50, who is not associated with armed republicanism.

McDonald has dismissed barbs about Sinn Fein’s past connection with the IRA, telling reporters that “war is over” and it was time to move on. “There’s nothing dangerous about housing people,” she said.

Sinn Fein is campaigning on social needs.

Sinn Fein lawmaker Eoin O Broin promised his party “would deliver the biggest public housing program in the history of this state. We will cut rents and freeze them. We will ensure that affordable housing is available and really affordable to people. We will also end the scandal of homelessness, which has been allowed to increase under the failed policies of this government.”

Jesuit priest Father Peter McVerry has spent his life working with homeless people and said he is not surprised the election is turning on housing.

“The private rental sector can’t cope,” McVerry said. “In Dublin, if you view an apartment or house to rent, there will be 40 people standing outside waiting to view it. Landlords now have all the cards stacked in their favor.”

In the last general election in 2016, no party won an outright majority — and that result is likely to be repeated, followed by a long struggle by one party or another to form a coalition government.

At a debate this past week, Varadkar said that if his party failed to win a majority, he would seek to form a coalition government with Labour, Independents, Greens or Social Democrats.

“What I won’t do is negotiate a coalition with Sinn Fein,” Varadkar said. “I’m concerned about their past, but I’m much more concerned about the present and the future.”

Even if Sinn Fein comes out on top in Saturday’s election, which is possible, the party cannot form a government on its own, as it is running only 42 candidates and the threshold is 80 in the 159-seat Irish Parliament.

If it does becomes a prominent party once the results are in, it would look to work with those on the left of the political spectrum first, McDonald said. If Sinn Fein is the new power broker, things could get really interesting — not only for Ireland but the United Kingdom.

Ferguson reported from Belfast. Booth reported from London.