Two months ago, British Prime Minister David Cameron was implicated in an international tax scandal amid declining support for his chief political initiative: preserving the U.K.’s membership in the European Union. Now, he’s watching the poll numbers rise backing Britain’s remaining in the bloc and enjoying a wave of support from the opposition Labour Party, which has conveniently raised the EU flag outside London’s City Hall.

As the debate on whether to exit the EU enters its final weeks, the British government has drummed away at the potential economic catastrophe of a so-called Brexit, as a move to leave the bloc has come to be known, and Cameron has won support from the Bank of England and leaders around the world. The prime minister has also benefited from the revitalized support of the opposition Labour Party — most notably, the new mayor of London, Sadiq Khan — which is generally pro-EU but has suffered from a lack of effective leadership during much of the referendum campaign.

“One of the big problems the ‘remain’ camp has is that the Labour Party leadership is not campaigning convincingly to stay in the EU,” said Simon Tilford, deputy director of the Center for European Reform in London. “Having won the mayor’s post, [Khan] has credibility. He appeals to the young and the ethnic vote. And he is savvy about the media.”

It’s a striking turnabout from two months ago, when Cameron became enmeshed in the global Panama Papers scandal because of his father’s use of an offshore trust. The revelation highlighted the prime minister’s privileged upbringing and undercut his argument that the elites and common people share an interest in staying in the EU.

Likewise, Europe’s refugee crisis also complicated Cameron’s argument that the U.K. is safer inside the EU, a vital point for Britons who see the none too popular phenonmena of immigration and assimilation as central outcomes of membership in the union.

British voters will register their sentiment about whether to “remain” in the EU or “leave” it June 23. The answer to this emotional, highly politicized question will both define the country’s relationship with its European neighbors for years and determine Cameron’s immediate political future.

A recent poll by the research firm Ipsos MORI found 48 percent of voters backed remaining in the EU while 35 percent supported leaving it, with 14 percent undecided. Among respondents expressing opinions, 60 percent favored remaining in the union and 40 percent favored leaving it.

Other surveys have generated similar results after a period in April that showed the “leave” forces with a rise in support.  An average of polls in late May indicates that “remain” leads “leave,” 53 percent to 47 percent.

Cameron and Khan British Prime Minister David Cameron (right) watches as London’s new Labour Party mayor, Sadiq Khan, urges residents to vote in favor of the U.K. remaining in the European Union. Photo: Reuters

“The move among Conservative voters and the new lead for ‘remain’ can be partially attributed to the increase in importance British voters place on the economy,” said Mujtaba Rahman, who heads the Europe practice at the political risk consultancy Eurasia Group, headquartered in New York.

The main argument of the “remain” forces, that the U.K. would suffer economically in the event it left the EU, got a boost in mid-May when Mark Carney, the governor of the Bank of England, said such a course would deter employment, fire inflation and send the British pound lower. He even indicated a recession could follow a vote in favor of a Brexit very quickly.

The central bank’s interest rate-setting body said a Brexit is the “most immediate and significant risk to the outlook.”

The statement continued a stream of high-level, international warnings about the impact of British voters’ decision. At the Group of Seven meeting in Japan last week, leaders put a Brexit in the same category with other potential geopolitical events such as conflict in the South China Sea and terrorism.

The last month has also seen pro-EU leaders in Cameron’s Conservative Party join forces with like-minded politicians in the Labour Party to make a full-throated case for remaining in the EU, a step bound to help cement support and raise turnout in June.

Cameron’s position in favor of remaining in the EU is generally a majority view among Conservatives, but not nearly as strongly felt as the so-called Euroskeptic desire to get out of the bloc. That means rallying Conservatives to the polls won't be easy. So, to ensure a decisive outcome, the prime minister needs Labour voters, especially the young and ethnic minorities. In turn, they are mostly pro-EU, but consider the Conservatives in general and Cameron in particular politically toxic.

Into this breach has come Khan, a charismatic, 45-year-old Briton of Pakistani descent who was just elected mayor of London in mid-May on the Labour Party ticket.

Khan took office after a bitter election campaign in which Cameron backed his opponent and criticized Khan’s fitness for the office. But the two quickly buried the hatchet, appearing together at a rally in London Monday.

Cameron called Khan “a proud Muslim, a proud Brit and a proud Londoner,” and Khan made clear he’d rally those elusive young and minority voters to Cameron’s cause.

“This vote is about our values, it is about our character, it is about how we see our city and our country in the future,” Khan said. “The reason why London is the greatest city in the world — and it is — we have never taken an isolationist approach. We are open-minded, we are outward-looking. We embrace other cultures and learn from other cultures and ideas as well.”

The new mayor struck a symbolic note by flying the EU flag, a circle of stars on a blue field, outside City Hall alongside the more fabled Union Jack. It’s a notable about-face from when Conservative Boris Johnson, Khan’s predecessor, held the office. Johnson is now the unofficial leader of the “leave” forces.

Khan’s full embrace of the “remain” campaign has the potential to turn a narrow win for Cameron into a decisive one.

London is the heart of pro-EU sentiment in Britain, thanks to a culture of openness to immigration and the international orientation of its business class.

The research firm Opinium found Londoners between 18 and 24 years old back EU membership by an astonishing 60 percent to 20 percent. City residents support the EU until they get over 55 years old, when they show signs of wanting to leave, according to the survey.

Voters who backed Khan will be a key constituency in the referendum next month, and, fresh off his mayoral victory, he has a good shot at rallying them to the European cause. A higher turnout favors the “remain” campaign.

“If everyone who’s eligible to vote would vote,” the Center for European Reform’s Tilford said, “it would be overwhelmingly in favor of staying.”