A top commander on Tuesday warned Iran not to test US resolve in the Gulf after Washington scaled back its naval presence in the area, saying no adversary should underestimate American military power in the region.

"I still have one carrier out there, and I would just caution any enemy that might look as an opportunity to take advantage of this situation that that would be very ill-advised if the president orders us into action," said General James Mattis, head of Central Command, in a clear reference to Iran.

"I have what it takes to make it the enemy's longest day and their worst day. And we'll get the other carrier out there quickly to reinforce," Mattis told the Senate Armed Services Committee.

Due to automatic budget cuts that went into force last week, the US military decided to cancel plans to maintain two aircraft carriers in the Gulf to save money.

Mattis, who oversees forces in the Middle East, said a second carrier, the USS Harry Truman, could deploy within 21 days or less if necessary and arrive in the Gulf within 14 days.

"I was on board USS Harry Truman and spoke with Admiral Kevin Sweeney about two weeks ago, and he assures me his air wing and his ships will be ready to deploy on short notice," Mattis added.

The carrier USS John Stennis, along with several destroyers and other ships, is currently patrolling the strategic waters near Iran's coast. It is due to be relieved by another aircraft carrier, the USS Dwight Eisenhower, which is now in the Mediterranean.

At the hearing, Mattis appeared to break ranks with the White House on Iran policy, saying he did not believe Iran would abandon its uranium enrichment work due to the pressure of tough economic sanctions.

But under further questioning from senators, the general appeared to backtrack and said that he supported President Barack Obama's policy on Iran, which has stressed sanctions and covert sabotage while playing down possible military action.

"Just to be clear, I fully support the economic sanctions," Mattis said.

"I believe they are trying to buy time with the negotiations. But that should not be in any way construed as we should not try to negotiate. I still support the direction we're taking. I'm just -- I'm paid to take a rather dim view of the Iranians, frankly."

The four-star general has clashed with the White House over Iran policy, with Mattis taking a more hawkish view, according to US officials, who spoke on condition of anonymity.

Mattis is due to retire within weeks amid speculation he was forced out of his post earlier than planned because of his disagreements with his civilian counterparts on Iran.