Prime Minister Malcolm Turnbull speaks at a breakfast event at Parliament House in Canberra, Australia. (Mick Tsikas/European Pressphoto Agency)

Australia’s urbane prime minister, Malcolm Turnbull, is trying to revive the fortunes of his unpopular government by borrowing from an unexpected role model: President Trump.

When he ousted his conservative predecessor, Tony Abbott, from office in 2015, Turnbull had made his reputation supporting the legalization of same-sex marriage, the strengthening of ties with China and the replacement of Queen Elizabeth II as the head of state with an Australian.

Representing one of the most progressive districts in the country, Turnbull is one of the most left-wing members of the center-right Liberal Party. Before he became prime minister, his signature policy was support for an emissions-trading plan to fight climate change, a position that led to the end of his first term as party leader in 2009.

“He came across as a very socially progressive and cosmopolitan politician before he became PM,” said Zareh Ghazarian, a political scientist at Monash University, in an interview. “Since becoming prime minister he has to modify his approach because of very conservative elements in his party.”

Voters haven’t warmed to Turnbull as prime minister, and he almost lost an election last year. Now facing what appears to be a guerrilla campaign by a bitter Abbott to undermine his leadership, Turnbull is not only copying elements of Trump’s conservative populist approach, he is awkwardly buddying up to the president in person.

At a recent ceremony at the Intrepid aircraft carrier museum in New York to mark the 75th anniversary of the Battle of the Coral Sea, Turnbull congratulated Trump after the House voted to repeal the Affordable Care Act.

“I got to say, it’s always satisfying to win a vote when people predict you’re not going to win it,” Turnbull told Trump from a podium. “So keep at it. It’s great.”

Many Australians cringed at the praise. Australia has universal health care, a system that not even some far-right political parties want to dismantle.

To improve his popularity and placate internal critics, Turnbull is implementing heftier national security policies and beefed-up social spending. In a move perceived to be aimed at Muslims, he is making it harder for foreigners to become citizens and spending more on the intelligence services. Fewer professional visas are being issued to foreign workers. At the same time, new school and welfare programs will make it difficult to rein in a large government budget deficit anytime soon.

One of the wealthiest politicians in the country, Turnbull was a partner at investment bank Goldman Sachs in the 1990s. The centerpiece of his last election campaign was a tax cut for business designed to stimulate the economy. Relentlessly attacked by the Labor opposition as a gift to overpaid corporate executives, the big-business component of the cut was rejected by the Senate, where the government is in the minority.

Then Turnbull pivoted and hit the five biggest banks with a large tax hike in May, even though the banks said the move would rebound onto customers. Members of Turnbull’s party were privately uncomfortable raising taxes, but the measure was popular: 68 percent of Australians agree with the plan, according to an Ipsos poll published May 15.

Turnbull’s switch illustrates how politics around the world are being upended by Trump’s election and the success of other anti-elite politicians. Xenophobia, economic populism and nationalism are becoming more influential in politics, even in prosperous and racially integrated societies such as Australia, where 67 percent of the population was born locally and 87 percent is Christian or nonreligious, according to the latest census.

One of the most assertive policy changes is the decision to make it harder to obtain Australian citizenship, which Australia’s tea-party-like One Nation party claimed credit for.

Applicants will have to be able to speak English, explicitly pledge allegiance to Australia and meet a vague test that they have “integrated” into Australian society. The criteria could include serving on a parent-teacher association or joining a surf-lifesaving club, according to the government, which hopes to make the changes this year.

Refugee representatives say immigrants will be required to have university-level English skills, which will be impossible for the most disadvantaged: women, refugees and the elderly.

“There is no correlation between English-language proficiency and commitment to the Australian nation,” said Paul Power, the chief executive of the Refugee Council of Australia, in an interview. “In the long run it will be very damaging for the country.”

One Nation founder Pauline Hanson, who toasted Trump’s election with champagne in front of the Australian parliament and wants to ban Muslim immigration, had pushed Turnbull in private and public to toughen the citizenship law after she was elected to the Senate last year.

“We are being taken for fools in this country by opening up our doors,” she said before the changes were announced. “It will all come to our standard of living, our way of life and our safety and security.”

Turnbull doesn’t concede that he has abandoned any of his liberal principles or is pandering to conservative elements in society. “The vast majority of Australians are pleased to see we are standing up for Australian values,” he said when challenged by a television interviewer.

Recently, when he thought he wasn’t being recorded, Turnbull mimicked Trump in a satirical off-the-record dinner speech. “The Donald and I, we are winning and winning in the polls,” he said, according to a surreptitiously recorded video obtained by the Nine television network. “We are winning so much, we are winning, we are winning like we have never won before.”

The leaking of the video triggered concerns among Australian diplomats that an angry tweet would emerge from the White House signaling a cooling of U.S.-Australian relations. It didn’t, although a contrite Turnbull felt forced to explain to Australians why he was mocking the U.S. president. “The butt of my jokes was myself,” he told a radio show.

With the Trump-like strategy comes one other similarity: a recent Newspoll put the government behind the opposition Labor Party, 53 to 47 percent.