US President Donald Trump, standing alongside Prime Minister Malcolm Turnbull at a White House press conference, issued North Korea with a military threat and encouraged the Australian Navy to join freedom of navigation exercises in the South China Sea.

Mr Trump and Mr Turnbull put on a mostly united front at the White House on Friday with the leaders exchanging multiple compliments.

The president said he loves Australia’s strict “merit-based” immigration rules and is keen to axe America’s green card lottery.

“That really protects the interest of Australia and its people,” Mr Trump told the large audience of Australian and US dignitaries, business leaders and former world number one golfer Greg Norman.

The president is still not a fan of the proposed Trans-Pacific Partnership with Australia and 10 other nations, out of which he pulled the US last year, although he did leave the door slightly open to re-joining.

“The Trans-Pacific Partnership is not a good deal for us,” Mr Trump said.

“If they made it a good deal for us I’d go in.”

The almost four hours Mr Turnbull and Mr Trump spent together was another major step forward after their contentious phone call last year about a refugee deal.

Mr Trump abruptly ended the planned one hour chat after just 24 minutes, and called the refugee resettlement agreement signed by the Obama administration as “dumb”.

Mr Turnbull showered Mr Trump with praise on Friday, a different tactic to his hard-nosed approach during that infamous call.

The prime minister reminded Mr Trump the US has a $US25 billion trade surplus with Australia.

Mr Turnbull also said he was “inspired” by the president’s recent tax cuts and wants to do the same in Australia.

The president’s administration on Friday announced “the largest set of sanctions ever imposed in connection with North Korea”, just hours before Mr Turnbull and wife Lucy pulled up to the South Lawn entrance of the White House and were greeted by Mr Trump and First Lady Melania.

Mr Trump said if the sanctions did not work and North Korea continued to pursue nuclear weapons he might launch “phase two”.

“Phase two may be a very rough thing,” Mr Trump said.

“Maybe very, very unfortunate for the world.”

Both leaders were largely positive with their comments about China, although Mr Trump likely angered the Asian power with his enthusiasm for the Australian Navy joining the US on freedom of navigation exercises in the South China Sea.

Australia has so far declined to do that.

“We would love to have Australia involved and I think Australia wants us to stay involved,” the president said.

Mr Turnbull and Mr Trump agreed to disagree on gun control, acknowledging Australia and the US viewed the issue through different lenses.

Mr Trump has been consumed by the issue the past week after 17 students and teachers were killed in a high school shooting rampage in Florida.

“Our history with gun control and regulations is obviously very different to the United States,” Mr Turnbull said, recalling how after the 1996 Port Arthur massacre then prime minister John Howard led the introduction of strict new gun laws.

Mr Trump has floated the idea of allowing teachers to be armed at schools.

“They are very different countries with very different sets of problems, but I think we are well on the way to solving that horrible problem that happens so too often in the United States,” Mr Trump said.