At least five non-American employees of the consulate and three of the attackers died in the fighting.
"We have five confirmed dead among our locally engaged staff and one of them is a contract (security) guard," U.S. Embassy spokeswoman Carol Kalin told Reuters.
Although an Americans was hurt in the attack, none were killed, according to initial reports.
"We have accounted for all Americans on the compound in Jiddah and none of them are being held hostage," Kalin told the Associated Press from Riyadh. "We have a local work force that was on duty and we are still in the process of accounting for (them)."
Saudi security officials had earlier said that four of its staff had died in the attack, but later Interior Ministry spokesman Brig. Gen Mansour al-Turki told the AP that none of its forces had died, but one officer had been seriously injured.
In Washington, President Bush condemned the attack, saying that assault showed that "terrorists are still on the move."
"They want us to grow timid and weary in the face of their willingness to kill randomly, kill innocent people," the president said.
The Saudi government, which has cracked down on Islamic militants since the Sept. 2001 attacks in the United States, condemned the assault as the work of a "stray bunch".
"Members of the deviant group this morning threw explosives at the gate of the U.S. Consulate in Jeddah and then entered the compound," an Interior Ministry official told Reuters. Members of Islamic militant groups often associated with Saudi-born al-Qaida leader Osama bin Laden are often called "deviants" by the Saudi government.
The attack began when the militants threw explosives at the front gate of the compound. They then forced their way into the facility. In the fighting, three attackers were killed, while two others were injured and arrested, the Saudi Interior Ministry announced.
Al-Arabiya satellite television reported the attackers carried out the assault armed with machine guns and hand grenades.
An unnamed American diplomat said the militants penetrated the security perimeter of the consulate, but that American officials had been able to flee to safe locations. It was unclear how far into the consulate compound the attackers got or if U.S. Marines stationed at the facility took part in the gun battle.
"All the Americans at the consulate were able to reach secure locations," the American diplomat told the AP. He described the injuries to the Americans as minor.
Reuters quoted a Saudi security official as saying the militants had been able to take some 18 local employees of the consulate hostage.
It was initially unclear if the five local employees of the consulate were killed during the kidnapping or in other clashes during the siege.
The interior ministry went on to say four of its troops had died during the assault that last some three hours.
"The situation was brought under control," the Saudi Interior Ministry said in a statement. It gave no further details.
By 9:30 a.m. EST, American officials confirmed the attack was over.
"No assailants remained on the loose. They have either been killed, captured or cornered," a senior State Department official told Reuters. "The attack is over but the all-clear signal has not been given because I think they are still working to completely secure the area and make sure there is no danger."
Residents of the western Saudi city were reportedly stunned by the size of the attack.
"The magnitude of this assault on the consulate has taken all Jiddah residents by surprise," Khaled al-Maeena, the editor of Arab News located in Jiddah, told the AP.