Homicide bombers posing as guests attacked American luxury hotels in Indonesia's capital and set off a pair of blasts Friday after evading hotel security, smuggling explosives into the Marriott and assembling the bombs in a room on the 18th floor, where an undetonated device was found after the explosions.

The bombers had stayed at the hotel for two days and set off the blasts in restaurants at both hotels. The blasts killed eight people and wounded more than 50, authorities said. At least eight Americans were among the wounded.

Indonesia's health ministry says at least four out of the eight people killed in the bombings were foreigners.

The Health Ministry crisis center said Saturday morning it has identified five of the dead, who include two from Australia, one from New Zealand, one from Singapore and one from Indonesia.

The bombings, which came two minutes apart, ended a four-year lull in terror attacks in the world's most populous Muslim nation.

"They had been using the room as their 'command post' since July 15, and today they were supposed to check out," police chief Gen. Bambang Hendarso Danuri said.

Click here to view photos.

Video: Click here to see stunning security footage that captured the moment of the blast.

The blasts at the high-rise J.W. Marriott and Ritz-Carlton hotels, located side-by-side in an upscale business district in Jakarta, blew out windows and scattered debris and glass across the street, kicking up a thick plume of smoke. An Associated Press reporter saw bodies being carried away in police trucks.

Authorities did not immediately name a suspect, but suspicion fell on the Jemaah Islamiyah or its allies. The Al Qaeda-linked network is blamed for past attacks in Indonesia, including a 2003 bombing at the Marriott in which 12 people died.

Indonesian President Susilo Bambang Yudhoyono said the attack was carried out by a "terrorist group" and vowed to arrest the perpetrators. He also suggested a possible link last week's national presidential election.

Security video footage captured the moment of the explosion in one of the hotels. The brief, grainy images show a man wearing a cap and pulling a bag on wheels walking across the lobby toward the restaurant, followed by a flash and smoke filling the air.

"There was a big explosion followed by a shock wave," said Ahmad Rochadi, a security guard at the Marriott who was checking cars in the basement. "I rushed upstairs and saw smoke billowing from the lobby."

Alex Asmasubrata, who was jogging nearby, said he walked into the Marriott before emergency services arrived and "there were bodies on the ground, one of them had no stomach," he said. "It was terrible."

The attack occurred as the Marriott was hosting a regular meeting of top foreign executives at major companies in Indonesia organized by the consultancy firm CastleAsia, said the group, which is headed by an American.

An Australian think tank, the Strategic Policy Institute, had warned the Southeast Asian terrorist group Jemaah Islamiyah might launch new attacks just a day before Friday's deadly strike.

The Manchester United football team canceled a visit to Indonesia in the wake of the attacks. The team had been scheduled to stay at the Ritz- Carlton on Saturday and Sunday.

Security is tight at five-star hotels in Indonesia. Guests typically walk through metal detectors and vehicles are inspected, but many visitors say searches are often cursory.

"If they (the terrorists) were to separate explosives and metals they could get through the detectors because the wands the hotels use do not detect explosives," said Jakarta-based security consultant Ken Conboy.

President Barack Obama condemned the "outrageous attacks" and said the U.S. government "stands ready" to help its ally in the effort to combat extremism.

"We will continue to partner with Indonesia to eliminate the threat from these violent extremists, and we will be unwavering in supporting a future of security and opportunity for the Indonesian people," Obama said.

The European Union also condemned the blasts.

The Marriott was hit first, followed by the blast at the Ritz-Carlton.

Security Minister Widodo Adi Sucipto told reporters the explosions happened at 7:45 a.m. and 7:47 a.m. (0045 and 0047 GMT, 8:45 p.m. and 8:47 p.m. EDT) and that "high explosives were used." He said eight people were killed and 50 wounded.

Anti-terrorist forces with automatic weapons rushed to the site, and authorities blocked access to the hotels in a district also home to foreign embassies.

It has been nearly four years since a major terrorist attack in Indonesia — a triple suicide bombing at restaurants at the resort island of Bali that killed 20 people.

Officials said a New Zealander was among those killed, and that 17 other foreigners were among the wounded, including eight Americans and citizens of Australia, Canada, Hong Kong, India, Italy, the Netherlands, Norway, South Korea and Britain.

None of the Americans suffered life-threatening injuries, State Department spokesman Robert Wood said. All were treated and two were taken to Singapore for additional medical care, he said.

The dead New Zealander was identified by his employer as Timothy David Mackay, 62, who worked for cement products manufacturer PT Holcim Indonesia. He was reportedly attending a business meeting at the Marriott.

There was no claim of responsibility for the attacks, but terrorism analyst Rohan Gunaratna said the likely perpetrators were from Jemaah Islamiyah.

"The only group with the intention and capability to mount attacks upon Western targets is Jemaah Islamiyah. I have no doubt Jemaah Islamiyah was responsible for this attack," he said.

There was a crackdown in recent years by anti-terrorist officials in Indonesia, a predominantly Muslim nation of 235 million, but Gunaratna said the group was "still a very capable terrorist organization."

Police have detained most of the key figures in the Indonesia-based Jemaah Islamiyah and rounded up hundreds of other sympathizers and lesser figures.

In October 2002 two Bali nightclubs were attacked killing 202 people, many of them foreign tourists. Jemaah Islamiyah was accused of responsibility.