"The explosion resulted from two car bombs that were parked about 50 feet away from the building," a police official told The Associated Press. He said "a number of charred bodies" were carried away from the scene.
The General Security building, the administrative headquarters of Saudi security, was severely damaged by the explosions, which came just days after a U.S. warning of possible terror attacks.
The Foreign Ministry is located behind the General Security building, in al-Nassiriyah neighborhood in central Riyadh.
The explosions, which occurred about 2 p.m. local time (7 a.m. ET), struck at an hour that workers would have been leaving their offices for the Saudi weekend.
Facades were torn off buildings at the site, revealing rooms ablaze. Cars parked nearby had been smashed by debris. Clouds of dust and black smoke rose from the building and settled over the neighborhood.
Saudi television showed the General Security building, about seven floors, with its glass facade shattered and severe damage inside. Fire brigades worked to extinguish the fires, and more than 20 ambulances had arrived at the scene. Two helicopters roved over the site of the explosion. Police cordoned off the area and evacuated the surrounding buildings.
Hanan Batteesha, an Egyptian housewife, heard the "big blast" and rushed down the stairs with her two children, 14 and 11.
"We heard wails and cries, then saw our neighbors running down the stairs," she said. By the time they reached the ground floor, "the gate was damaged, windows started shattering, and glass fell all over us."
"The fronts of the buildings around us were damaged, the air conditioners mangled and there was smoke everywhere," she said.
The blast was heard and felt more than 3 miles away.
The explosions came only days after Saudi authorities announced they had seized three booby-trapped SUVs that were loaded with a total of more than four tons of explosives and had apparently been abandoned by militants involved in a shootout with security forces.
The April 12 shootout in Riyadh left one suspected militant and one policeman dead. A manhunt ensued and the next morning, militants opened fire on police at a checkpoint in Riyadh, killing four police officers. Eight people were later arrested in connection with the shootouts.
The United States last week ordered the departure of nonessential U.S. government employees and family members from Saudi Arabia. It also urged private citizens to leave the kingdom, and the U.S. Embassy in Riyadh issued an advisory warning of "credible indications of terrorist threats aimed at American and Western interests in Saudi Arabia."
That terror warning was only the latest in a string of alerts issued by Western governments to citizens living or visiting in Saudi Arabia,
Last month, as part of a tightening of security at U.S. installations in the region, the U.S. Embassy in Riyadh briefly closed after rumors spread of an explosion. That closure came two days after Israel's assassination of Sheik Ahmed Yassin, founder of Hamas, prompted calls for revenge against Israeli and American targets.
The State Department had recommended in December that diplomats' families leave Saudi Arabia. A U.S. counterterrorism official, who spoke on condition of anonymity, said no single specific threat or piece of intelligence triggered that recommendation.
The Arab kingdom is in a precarious position in the war on terrorism. It is a close U.S. ally, but also was home to 15 of the 19 Sept. 11 hijackers, leading some to question the Arab kingdom's commitment to fighting militants.
Saudi Arabia has been working to overcome that perception, as well as to put down fundamentalist opposition to the long-ruling royal family.
Last year, the Saudi capital suffered two major attacks by suicide bombers driving vehicles filled with explosives. A total of 51 people were killed in the May and November bombings, including the assailants.
The Saudis pursued terrorists and Islamic extremists vigorously after those attacks, arresting hundreds of people.
The attacks were blamed on Osama bin Laden's al Qaeda, the network accused of masterminding the Sept. 11, 2001, strikes in the United States.
The diplomatic quarter east of Riyadh has been guarded heavily by Saudi armed forces since the suicide attacks. Travel by American officials and their families in Riyadh is restricted already to the hours between 6 a.m. and 6 p.m.
There are some 200 to 300 nonessential U.S. officials and family members in Saudi Arabia, and some 30,000 U.S. citizens in all.