US President Donald Trump has instructed the country's navy to fire on Iranian gunboats, two days after Iranian officials blamed the US for raising tensions in the oil-rich, shipping-critical region.

"I have instructed the United States Navy to shoot down and destroy any and all Iranian gunboats if they harass our ships at sea," Trump tweeted Wednesday morning.

Last week, the US Navy's Fifth Fleet accused the Iranian Revolutionary Guard Corps (IRGC) Navy of "unsafe & unprofessional" seamanship after several small ships got within 50 yards of the USS Lewis B Puller and within 10 yards of the US Coast Guard ship Maui.