​President Donald Trump pressed aides about whether he could invade Venezuela during an Oval Office discussion last year about imposing sanctions on the South American country as it was roiled by political and economic crises, according to a report on Wednesday.

​The suggestion stunned the aides, including Secretary of State Rex Tillerson and national security adviser H.R. McMaster – both of whom are no longer with the administration – and sparked a heated debate for about five minutes last August, the Associated Press reported. ​

McMaster was among the advisers who explained that any military action could backfire and threaten the support the US built up with other Latin American governments to punish President Nicolas Maduro for jailing opponents and consolidating power in an effort to establish a dictatorship.

Despite the arguments against, Trump persisted and brought up the successful use of the US military to invade Panama and Grenada in the 1980s.

Although the president gave no indication he was about to call up the military, the idea appeared to remain in his head.

The next day, Aug. 11, Trump floated the idea that he would use a “military option” to solve the escalating unrest in Venezuela that threatened security in the area.

“We are all over the world and we have troops all over the world in places that are very, very far away,” the president said. “Venezuela is not very far away and the people are suffering, and they are dying. We have many options for Venezuela, including a possible military option if necessary.”

Trump also mentioned the proposal with Colombian President Juan Manuel Santos, the AP reported, and in September spoke to leaders of four Latin American countries at the United Nations General Assembly about it.

Eventually, McMaster was able to persuade Trump of how dangerous an invasion would be.

​The White House declined comment, the AP reported, but a spokesman for the National Security Council said the US will consider all options to restore Venezuela’s democracy.

The US, Canada and the European Union have slapped sanctions on Maduro and dozens of Venezuela officials over allegations of corruption, drug trafficking and human rights abuses.