Saudi Arabia’s security officers shot dead a suicide bomber outside of the US consulate service in the port city of Jeddah, local media reported. The attacker was killed while trying to detonate himself as Americans kicked off 4th of July celebrations.

Two security officers were slightly injured as they tackled the man, but no one else was hurt.

The attack came in the early hours of US Independence Day and shortly before dawn prayers marking the start of the daily Ramadan fast.

Militants attacked the Jeddah consulate in 2004, leaving nine people dead.

The US State Department said it was aware of Monday's blast, adding that it "can confirm that all personnel under chief of mission authority are accounted for at this time".

Security guards became suspicious of a man in the car park of the Dr Suleiman Faqeeh hospital around 02:15 (23:15 GMT Sunday), interior ministry spokesman Maj-Gen Mansour al-Turki said in a statement.

The hospital is opposite the US consulate.

As the guards approached the man, "he blew himself up with a suicide belt inside the hospital parking," the statement said.

The US embassy in Saudi Arabia issued a warning after the attack, urging Americans to "remain aware of their surroundings, and take extra precautions when travelling throughout the country".