President Trump and Prime Minister Malcolm Turnbull of Australia on Thursday played down the testy phone exchange that began their working relationship as they met face to face aboard the aircraft carrier Intrepid in Manhattan.

“We get along great. We have a fantastic relationship, I love Australia, I always have,” Mr. Trump told reporters who witnessed a portion of the meeting between the two wealthy, iconoclastic, deal-making politicians in a room near the ship’s main dining area.

The two attended a dinner aboard the Intrepid, now a museum docked in the Hudson River, to honor the 75th anniversary of the strategic victory of the United States and Australia over Japan in the Battle of the Coral Sea during World War II.

Their earlier encounter, an acrimonious first phone call in February, was spoiled by Mr. Trump’s hostile reaction to a deal with Australia that President Barack Obama negotiated in the final weeks of his second term. In it, the United States agreed to take in as many as 1,250 refugees that Australia was holding at offshore detention centers.