Several foreigners are among those being detained by eight or nine gunmen in Dhaka’s Gulshan district, they add.
Two police officers have been killed in a gun battle, a spokesman said, and about 30 others injured.
ISIS has already said it carried out the attack.
A statement on ISIS’ self-styled news agency Amaq said militants had attacked a restaurant “frequented by foreigners”. It said that more than 20 people “of different nationalities” had been killed but this has not been confirmed.
Security forces say they are trying to negotiate the hostages’ release.
Initial reports said that as many as 20 foreigners were among those taken captive.
Italian nationals are believed to be among them, a source at the Italian foreign ministry said, quoted by Reuters.
Benazir Ahmed, chief of the Rapid Action Battalion, Bangladesh’s elite police force said: “We want to resolve this peacefully. We are trying to talk to the attackers.
“Our first priority is to save the lives of the people trapped inside.”
Police said the gunmen burst into the Holey Artisan Bakery cafe at about 21:20 local time and opened fire.
The cafe is described as being popular with expats, diplomats and middle-class families.
Media reports quoted witnesses as saying that “Allahu Akbar”, meaning “God is greatest”, was heard as the attack took place.
Another local resident, Tarique Mir, said he could hear sporadic gunfire nearly three hours after the attack began.
Although high-profile gun attacks are rare in Bangladesh, the latest incident follows a series of murders widely blamed on Islamist extremists.
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…