Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A bloody attack and standoff in Bangladesh that left at least four security personnel dead and around 40 people feared taken hostage in the country’s capital stretched into a second day Saturday.

A group of between seven and eight attackers armed with guns and bombs stormed a restaurant in the diplomatic district of Dakha at around 9:20 p.m. Friday local time (11:20 a.m. ET) and were holding customers and staff hostage, a senior police official said.

The attack took place at the Holey Artisan Bakery in Dhaka's Gulshan district. The standoff was continuing as the sun rose in Dhaka Saturday, eight hours after the attack.

"No one is allowed to enter or leave," Itrat Saeed, who has a house in the neighborhood where the attack occurred, told NBC News. "My parents are blockaded in our house."

The ISIS-affiliated Amaq news agency reported that the ISIS had claimed responsibility for the attack, according to the terror research firms Flashpoint Intelligence and Site Intelligence Group. The claim has not been confirmed, and the State Department said it was still assessing it.

The senior police official, Assistant Superintendent Fazle-e-Elahi, said most of the police casualties occurred when one hostage escaped. As officers rushed to help him a grenade was tossed at them from a balcony. The dead included the assistant police commissioner, he said.

He described the assailants as "heavily armed and equipped" and "tactically sound."

"The attackers are not identified. They were shouting 'Allah Akbar' when they entered the restaurant," Fazle-e-Elahi said.

Bangladeshi security personnel stand guard near a restaurant that has reportedly been attacked by unidentified gunmen in Dhaka, Bangladesh on July 1, 2016. STR / AP

A doctor at a nearby hospital told NBC News that the facility had received 26 people wounded, most of them security personnel, six of whom were in critical condition.

Police tried to negotiating to end the standoff without further deaths, Fazle-e-Elahi said.

"We are trying to communicate and begin a negotiation based on conditions," he said. "We want a peaceful settlement. But the conditions will have to be met."

Sumon Reza, a kitchen staffer who escaped the attack, told reporters that the gunmen were armed with firearms and bombs as they entered the restaurant.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A huge contingent of security guards cordoned off the area around the establishment, trading gunfire with the attackers who set off bombs.

Maimuna Ahmad, who lives near Holey Artisan, which is popular with foreigners, said she previously noticed the lack of heavy security there.

"There's a gate and guard, but you could walk in without any hindrance if you wanted to," she told MSNBC.

"Some derailed youths have entered the restaurant and launched the attack," said Benazir Ahmed, director general of the elite anti-crime force Rapid Action Battalion or RAB. "We have talked to some of the people who fled the restaurant after the attack. We want to resolve this peacefully. We are trying to talk to the attackers, we want to listen to them about what they want."

Bangladeshi police take cover near a restaurant that has been attacked by unidentified gunmen on July 1, in Dhaka, Bangladesh. Mahmud Hossain Opu / Getty Images

President Barack Obama was briefed about the situation and will be receiving updates, a White House official said.

State Department spokesman John Kirby said all of the Americans under the diplomatic chief of mission in Dhaka are accounted for. Officials were still accounting for other American citizens who may have been in the area.

"At no time was the embassy compound itself under immediate threat from this attack," Kirby said.

The State Department urged any U.S. citizens near the Gulshan area of Dhaka to "contact loved ones directly or use social media to alert them of your status."

A Japanese government spokesperson said "there is a possibility that Japanese citizens might have gotten trapped in the hostage situation," but the government had not confirmed any of its citizens were involved and was gathering information.

Kirby said the U.S. is in contact with the government of Bangladesh. "We have offered our assistance in their efforts to bring to justice those responsible for these attacks and to combat terrorism and violent extremism," Kirby said.

People help an unidentified injured person after a group of gunmen attacked a restaurant popular with foreigners in a diplomatic zone of the Bangladeshi capital Dhaka, Bangladesh on July 1. AP

The U.S. Embassy in Dhaka asked Americans in the area to shelter in place and monitor reports.

Reports of shooting and hostage situation in Gulshan 2, Dhaka. Please shelter in place and monitor news. — U.S. Embassy Dhaka (@usembassydhaka) July 1, 2016

The attack comes just days after explosions rocked Turkey's largest airport, leaving more than 40 dead. There has been no official claim of responsibility for that attack.

“This is the second significant terror attack in one week, in vastly different parts of the world,” Sen. Richard Burr (R-NC), chairman of the Senate Select Committee on Intelligence, said in a statement. “Extremist groups are no longer challenged by the distance to their targets and we are likely no longer protected by the vast oceans beyond our borders. The terrorist threat is truly global.”

Security in Dhaka has been stepped up since last year following an ISIS-claimed attack during a Shiite Muslim holiday, when one person was killed and dozens of others were hurt.

Saeed, who is friends with the manager of the bakery that was attacked, described the restaurant as popular with foreigners. Saeed's friend who runs the restaurant posted on Facebook that he is safe, Saeed said.

"Another friend's daughter is in there," Saeed said. "We haven't heard from her."