The flare-up — and conflicting characterizations of the call from Mr. Trump and Mr. Turnbull — threatened to do lasting damage to relations between the two countries and could drive Canberra closer to China, which has a robust trading relationship with Australia and is competing with Washington to become the dominant force in the Asia-Pacific region.

A senior Trump administration official said the president told Mr. Turnbull on Saturday that the refugees could include the “next Boston bombers.” He also said he was “going to get killed” politically by the deal, given that the day before he signed an executive order to stem the refugee flow into the United States and refuse visas for all citizens from seven Muslim countries.

The Trump administration official said the call was shorter than planned, and ended abruptly after Mr. Turnbull told the president it was necessary for the refugees to be accepted.

The details of the call were confirmed by a senior administration official with direct knowledge of the exchange who spoke on condition of anonymity because he was not authorized to publicly discuss the diplomatic talks.