Washington: The top US nuclear commander says he would resist President Donald Trump if he ordered an "illegal" launch of nuclear weapons.

Air Force General John Hyten, commander of the US Strategic Command (known as STRATCOM), told an audience at the Halifax International Security Forum in Nova Scotia, Canada that he had given a lot of thought to what he would say if he received such an order.

"I think some people think we're stupid," General Hyten said in response to a question about such a scenario.

"We're not stupid people. We think about these things a lot. When you have this responsibility, how do you not think about it?"