Donald Trump has said a US military strike against North Korea would “be a very sad day” for Kim Jong-un’s regime, but said that such action was “not inevitable”.

Tensions – and the strength of the rhetoric – between the two countries have flared over the past few months, with North Korea continuing to ramp up its nuclear and ballistic weapons programme despite international condemnation.

The isolated country conducted its sixth and largest nuclear test last weekend, demonstrating the regime is closer to achieving its goal of developing a powerful nuclear weapon that could reach the US mainland.

Washington continues to seek a way to rein in North Korea, but there is concern that the regime might not be able to be deterred.

“Military action would certainly be an option. Is it inevitable? Nothing's inevitable,” Mr Trump said during a news conference with the Kuwaiti Emir Sheikh Sabah al-Ahmad al-Jaber al-Sabah, where he also said he would be willing to step in to mediate the dispute between US-allied Gulf Arab states and Qatar.

On North Korea Mr Trump said: “I would prefer not going the route of the military, but it's something certainly that could happen... Our military has never been stronger,” boasting of the US's increase in military spending since he took office in January.

“Each day, new equipment is delivered, new and beautiful equipment, the best in the world, the best anywhere in the world by far,” he told reporters. “Hopefully, we're not going to have to use it on North Korea. If we do use it on North Korea, it will be a very sad day for North Korea.”

When asked if he would tolerate a nuclear armed – but contained and deterred – North Korea, the President refused to give a definitive answer.

“I don't put my negotiations on the table, unlike past administrations,” Mr Trump said. “I don't talk about them. But I can tell you that North Korea's behaving badly, and it's got to stop.”

A senior Trump administration official said that there was a grave risk that North Korea might “miscalculate” the US response to its behaviour and warned Pyongyang not to “underestimate American will to protect ourselves and our allies.”

Before a meeting with the Moroccan Foreign Minister earlier on Thursday, US Secretary of State Rex Tillerson was asked if he had any response to North Korea’s latest nuclear test. “Oh, we’ll have one,” Mr Tillerson responded, but offered little clarification.

Donald Trump's international Presidential trips Show all 22 1 /22 Donald Trump's international Presidential trips Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump AFP/Getty Images Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump talk as they leave the Army Museum at Les Invalides in Paris AFP/Getty Images Donald Trump's international Presidential trips German Chancellor Angela Merkel and US President Donald Trump arrive for the group photo at the G7 Taormina summit on the island of Sicily in May 2017 Getty Images Donald Trump's international Presidential trips Mr Trump was pressed on the subject at the G7 summit in Italy Getty Donald Trump's international Presidential trips US President Donald Trump gives a speeech at the Warsaw Uprising Monument on Krasinski Square Getty Donald Trump's international Presidential trips US President Donald Trump and Britain's Prime Minister Theresa May during a ceremony at the NATO headquarters before the start of a summit in Brussels, Belgium Reuters Donald Trump's international Presidential trips Montenegro's Prime Minister Dusko Markovic is seen to the right of Donald Trump at a Nato summit in Brussels REUTERS Donald Trump's international Presidential trips Pope Francis meeting with US President Donald J. Trump EPA Donald Trump's international Presidential trips Pope Francis poses with US President Donald Trump and First Lady Melania Trump AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump arrives at Palazzo del Quirinale ahead of the meeting with Italian President Sergio Mattarella Ufficio Stampa Presidenza della via Getty Donald Trump's international Presidential trips US President Donald Trump is seen during a joint press conference with the Palestinian leader at the presidential palace in the West Bank city of Bethlehem AFP/Getty Images Donald Trump's international Presidential trips Palestinian president Mahmoud Abbas meets US President Donald Trump PPO via Getty Donald Trump's international Presidential trips Israeli Prime Minister Benjamin Netanyahu speaks with US President Donald Trump prior to the President's departure GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump and Israel's Prime Minister Benjamin Netanyahu shake hands after delivering a speech at the Israel Museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and First Lady Melania Trump lay a wreath in the Hall of Remembrance as White House senior advisor Jared Kushner and Ivanka Trump watch on during a visit to the Yad Vashem Holocaust Memorial museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump visit to Yad Vashem Holocaust museum in Jerusalem accompanied by Prime Minister Benjamin Netanyahu GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump takes his seat before his speech to the Arab Islamic American Summit in Riyadh in Saudi Arabia Reuters Donald Trump's international Presidential trips Saudi Arabia's King Salman bin Abdulaziz al-Saud, US President Donald Trump and US First Lady Melania Trump look at a display of Saudi modern art at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and Saudi Arabia's King Salman bin Abdulaziz al-Saud take part in a signing ceremony at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips King Salman presents Donald Trump with The Collar of Abdulaziz al-Saud Medal at the Royal Court Palace on 20 May AP Donald Trump's international Presidential trips US President Donald Trump is welcomed by Saudi King Salman bin Abdulaziz al-Saud upon arrival at King Khalid International Airport in Riyadh AFP/Getty Images Donald Trump's international Presidential trips U.S. President Donald Trump and first lady Melania Trump walk on the South Lawn prior to their first foreign trip Getty Images

While Mr Trump talked tough on North Korea, China agreed on Thursday that the United Nations should take more action against Pyongyang – as the US has been urging – but also kept pushing for dialogue to help resolve the standoff.

“Any new actions taken by the international community against the DPRK should serve the purpose of curbing the DPRK's nuclear and missile programmes, while at the same time be conducive to restarting dialogue and consultation,” Chinese Foreign Minister Wang Yi said, referring to North Korea by the initials of its official name, the Democratic People's Republic of Korea.

North Korea said it would respond to any new UN sanctions and US pressure with “powerful counter measures”, accusing the US of aiming for war.

The United States wants the UN Security Council to impose an oil embargo on North Korea, ban its exports of textiles and the hiring of North Korean labourers abroad, and to subject Mr Kim Jong-Un to an asset freeze and travel ban, according to a draft resolution leaked ahead of a possible vote next Monday.

At his press conference with the Kuwaiti Emit, Mr Trump also offered to personally mediate a dispute between Qatar and other Arab countries.

In June, Saudi Arabia and its Gulf allies launched a coordinated diplomatic and economic campaign to isolate Qatar, which they accuse of backing extremist groups. Mr Trump later seemed to escalate the row, also claiming that Qatar supported terrorism and said “the time had come to call on Qatar to end its funding … and its extremist ideology in terms of funding.”

Mr Trump had met Arab leaders in Saudi Arabia in May, during his first trip abroad as president, when they urged him to challenge Qatar.

“While I do appreciate and respect the mediation, I would be willing to be the mediator,” Mr Trump said alongside Sheikh Sabah.

“I was telling the emir before that if I can help between UAE and Saudi Arabia … if I can help mediate between Qatar and, in particular, the UAE and Saudi Arabia, I would be willing to do so.”

Mr Trump noted that he spoke to King Salman of Saudi Arabia by phone on Wednesday, describing their relationship as “very great” and calling him “a friend of mine.”

“I think you’d have a deal worked out very quickly. I think it’s something that’s going to get solved fairly easily,” Mr Trump said. “Kuwait has been really the leader of getting it solved, and we appreciate that very much. But I do believe that we’ll solve it. If we don’t solve it, I will be a mediator right here in the White House. We’ll come together very quickly. I think we’ll have something solved.”