Militants in Saudi Arabia have attacked the U.S. Consulate in the port city of Jeddah with machine guns and explosives.

Authorities say at least four Saudi security guards and three of the attackers are dead.

A Saudi Interior Ministry statement said militants launched the late-morning attack with explosives aimed at the main gate of the heavily-fortified U.S. compound.

Two gunmen were reported in custody and officials say security forces had regained control of the compound by mid-afternoon.

There has been no claim of responsibility.

The attack is the latest in a series of assaults targeting foreigners in the kingdom over the past 18 months. The U.S. State Department has issued a series of travel warnings in the past year, urging all non-essential Americans to leave the country.

Some information for this report provided by AP, AFP and Reuters.