DHAKA, Bangladesh — As many as nine gunmen attacked a restaurant popular with foreigners in a diplomatic zone of the Bangladeshi capital on Friday night, taking dozens of hostages and exchanging gunfire with security forces, authorities and a witness said.

Two police officers were killed in the attack, the police said. CBS News confirmed at least 12 people were injured.

Hospital authorities said another 25 officers and one civilian were being treated for injuries, including 10 people listed in critical condition. The injuries include bullet wounds and broken bones, they said.

A huge contingent of security forces cordoned off the area around the Holey Artisan Bakery in Dhaka’s Gulshan area. Several other wounded police officers were hospitalized after security forces exchanged fire with the attackers inside the restaurant who also hurled bombs. A local resident Lutful Amin told the AP he heard several explosions, the last of which went off around 10:45 p.m.

The Islamic State of Iraq and Syria, or ISIS, claimed responsibility for the attack. ISIS and al Qaeda affiliates have claimed responsibility for many recent attacks in the country but the government denies that either group has a presence there.

The head of the elite anti-crime force, Rapid Action Battalion, told reporters Friday night that they were working to save the lives of the people trapped inside the restaurant. Authorities said the hostages included an unknown number of foreigners.

Witnesses described the attack scene. “Some derailed youths have entered the restaurant and launched the attack,” Benazir Ahmed said. “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.”

“Some of our people have been injured. Our first priority is to save the lives of the people trapped inside,” Ahmed said. He would not say how many people were trapped inside.

At least 35 people, including about 20 foreigners, were still trapped inside the restaurant, according to kitchen staffer, Sumon Reza, who was among more than 10 people who managed to run to the rooftop and escape.

He said the attackers chanted “Allahu Akbar” (God is Great) as they launched the attack around 9:20 p.m. Friday, initially opening fire with blanks.

In Washington, State Department spokesman John Kirby told reporters: “We are aware of reports of what appears to a hostage situation in the Gulshan neighborhood of Dhaka.”

“Our embassy in Dhaka has confirmed 100 percent accountability of all official American personnel with no injuries reported,” Kirby said. “We are working with the local authorities to determine if any U.S. citizens and locally-employed staff were affected.”

He said it was too early to say who was involved in the assault and their motivation.

“We have seen ISIL claims of responsibility, but cannot yet confirm and are assessing the information available to us,” Kirby said. “We are in ongoing contact with the Government of Bangladesh as the situation continues to unfold. We have offered our assistance in their efforts to bring to justice those responsible for these attacks and to combat terrorism and violent extremism.”

All Defense Department employees in the area were accounted for, CBS News national security correspondent David Martin reports.

On Twitter, the U.S. Embassy in Dhaka advised people to shelter in place.

President Obama was briefed on the situation by his counterterrorism adviser, Lisa Monaco, a White House official told CBS News. Mr. Obama asked to be kept informed as the situation developed.

Bangladesh, a traditionally moderate Muslim-majority nation, has recently seen an upsurge in militant violence. Nearly two dozen atheist writers, publishers, members of religious minorities, social activists and foreign aid workers have been slain since 2013 by attackers wielding machetes. The frequency of attacks has increased in recent months. On Friday, a Hindu temple worker was hacked to death by at least three assailants in southwest Bangladesh.

The attacks have raised fears that religious extremists are gaining a foothold in the country, despite its traditions of secularism and tolerance.

On Thursday, the State Department officially designated al Qaeda’s affiliate in Bangladesh, al Qaeda in the Indian Subcontinent, as a foreign terrorist organization. The group has claimed responsibility for the killings of U.S. citizen Avijit Roy and U.S. Embassy worker Xulhaz Manna, who was hacked to death, according to the department.

Prime Minister Sheikh Hasina’s government has cracked down on domestic radical Islamists. It has accused local terrorists and opposition political parties – especially the main opposition Bangladesh Nationalist Party and its Islamist ally Jamaat-e-Islami – of orchestrating the violence in order to destabilize the nation, which both parties deny.

© 2016 CBS Interactive Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.