The phone call, just 24 minutes long, reverberated around the world.

On his eighth day in office, President Trump blasted and badgered Australia’s leader over an immigration dispute, telling Prime Minister Malcolm Turnbull, “this is the most unpleasant call,” before abruptly hanging up on the head of one of America’s staunchest allies.

But when Turnbull visits the White House on Friday, it will mark a stark turnabout from his contentious call with Trump last Jan. 28. The Australian leader has become one of the U.S. president’s closest partners, as they work on issues ranging from the North Korean nuclear threat to infrastructure plans in their respective countries.

“Sometimes the strongest relationships can start with a bit of a quarrel and both parties end up having a great deal of respect for each other,” said Joe Hockey, Australia’s ambassador to the United States.

The century-old alliance between the two nations is a critical one. They share intelligence and diplomatic support, and Australian troops have fought alongside Americans in every combat mission since World War I. The two democracies are also important trading partners, and the United States believes that a strong Australia can help counter a rising China in the Asia-Pacific region and be a strategic ally against North Korea.

Their first call turned sour when Trump spurned Turnbull’s attempts to confirm that the new U.S. administration would honor the Obama administration’s pledge to accept roughly 1,250 refugees from an Australian detention center — an agreement Trump dismissed as “a horrible deal, a disgusting deal that I would have never made.”

Trump’s brusque behavior — first reported Feb. 2 in The Washington Post — alarmed leaders across the globe, who worried the call revealed a volatile temperament and a lack of knowledge about American alliances. The concerns were exacerbated by the fact that Trump had a far more cordial conversation the same day with Russian President Vladi­mir Putin.

“No one was surprised to learn that Mr. Trump had a poor telephone manner, but the nature of the call was very unusual,” said Michael Fullilove, executive director of the Lowy Institute in Australia. “Australians were left to wonder, what do we make of the fact that he would have a very friendly call with an opponent of the liberal order and an adversary of the United States but treat our prime minister with disrespect?”

Thomas Wright, a senior fellow at the Brookings Institution, said the clash was a natural outcome, considering both Trump and Turnbull are “very alpha types.”

“Turnbull was aggressive and didn’t suffer fools gladly and was determined to stick to the letter of the [refugee] agreement and get as much as he could get,” Wright said. “Sounds like Trump, right? They both wanted to ‘win’ the interaction, and the result was this catastrophic phone call.”

The clash has taken a toll on Australian attitudes toward the United States. Only 29 percent of Australians had confidence in Trump’s handling of foreign affairs in a June 2017 survey by the Pew Research Center. During President Barack Obama’s second term, Pew found that 84 percent of Australians had confidence in the U.S. president.

The effort to repair the Trump-Turnbull relationship spanned multiple conversations and four continents, and it involved at least one celebrity mediator: Australian golf pro Greg “The Shark” Norman.

Norman, a friend of both Trump and Turnbull, had already been eager to foster a bond between the two leaders. Shortly before Trump’s inauguration, Norman dined with the president-elect, stressing Australia’s historic importance to the United States. He continued delivering that message after the acrimonious phone call, and later had lunch with Turnbull in Sydney.

“They did get off to a rocky start, but at the end of the day I think President Trump started to understand the depth and the strength of the relationship between the United States and Australia over all these years, 100 years,” Norman said. “He started to realize, okay, little brother is a powerful little brother.”

Norman is not the only prominent Australian who is close to both leaders. News Corp. Chairman Rupert Murdoch helped extend the invitation to Trump to join Turnbull aboard the aircraft carrier USS Intrepid in New York about three months after their initial testy exchange.

In a meeting many Australians viewed as a rapprochement, Trump made the journey for a dinner honoring the 75th anniversary of the two countries’ World War II victory over Japan in the Battle of the Coral Sea.

“Instead of meeting with Turnbull for 15 minutes in the Oval Office, President Trump flew to New York, got in a tuxedo and spent an evening on a decommissioned aircraft carrier,” Fullilove said. “He realized he had done the wrong thing and he was trying to fix it.”

At the time, both leaders sought to play down their earlier spat, with Trump calling it “a little bit of fake news.”

Then, at the Group of 20 summit in Hamburg, Trump invited Turnbull into a room made for secure communications for what Turnbull later described as “a very informal meeting” in a “large, steel broom cupboard.”

The president also invited the Australian prime minister for an impromptu ride in The Beast — Trump’s fortified limousine, complete with bulletproof glass, weapons and emergency medical supplies.

“I find him very easy to deal with,” Turnbull told reporters at the time. “He is very frank, very straightforward.”

And last November in Manila, the two leaders met one-on-one in Trump’s private hotel suite — yet another sign of closeness between the men.

“It wasn’t simply that we were waiting for the next phone call,” a senior Australian official said. “The personal time they were able to spend in a series of both formal meetings and then time by themselves was important.”

In many ways, Trump and Turnbull should have been natural allies from the start. In addition to their countries’ mutual interests, the two men share a business background, with Turnbull once having been a partner at Goldman Sachs. The Australian prime minister, 63, also embodies the sort of person who makes the 71-year-old U.S. president comfortable: wealthy, male and older — someone the president views as a peer.

“They’re both very successful business executives, and Malcolm Turnbull understands New York better than almost any other Australian, obviously apart from Rupert Murdoch, so they had some natural binding forces,” Hockey said. “They’re both strong characters who are fiercely defensive of their national interests. And when you read the transcript of the famous phone call you can tell that both of them are battling for their national interests.”

Yet in other ways, Turnbull is a counterbalance to Trump. He has several degrees and studied at Oxford as a Rhodes scholar. He is cosmopolitan, with a Mandarin-speaking son and Chinese ­daughter-in-law, and he collects fine art.

Turnbull arrived in Washington Wednesday evening for his four-day visit to the United States, anchored by a one-on-one Oval Office meeting with Trump on Friday. The two leaders will also have a working lunch at the White House with their respective delegations before holding a joint news conference. First lady Melania Trump separately will host Turnbull’s wife, Lucy, for lunch.

Turnbull is visiting with a large delegation of Australian ministers, elected officials and business executives, and he plans to address the National Governors Association.

One unexpected issue that could come up is gun control: In the wake of the deadly school massacre in Parkland, Fla., some Americans have pointed to Australia as an example of a country that has successfully enacted strict prohibitions on firearms.

Asked about their tumultuous phone call Wednesday before leaving Australia, Turnbull told reporters the relationships had since taken a turn. “We get on very well,” he said.

Norman also expressed optimism about the burgeoning partnership. “The prime minister wants to see the president succeed,” he said. “If the president succeeds, America succeeds. Then the rest of the world follows suit.”

Trump has not yet visited Australia as president, but he has had some at least limited exposure to the country’s culture. Scenes from the 1986 Outback comedy “Crocodile Dundee” were filmed at the Plaza Hotel, which Trump purchased two years later.

“I love Australia,” Trump said, speaking at the Intrepid with Turnbull. “I always have.”

After Australian tourist officials did a “Crocodile Dundee” spoof in a Super Bowl ad earlier this month, Trump’s son, Donald Trump Jr., took to Twitter to call for a reboot of the franchise.

And as Turnbull and Trump prepared to meet this week, the source of their tension a year ago seemed to have faded: A small group of refugees left Australia this month, according to the Sydney-based Refugee Action Coalition, bound for the United States. More are scheduled to come soon.