Bangladeshi police hunted for six members of a domestic Islamist group they suspect helped gunmen attack a Dhaka cafe, as officials began questioning families of the militants for clues as to what turned them into killers on Tuesday.

Gunmen stormed the restaurant in Dhaka's diplomatic zone late on Friday and killed 20 people, most of them foreigners from Italy, Japan, India and the United States, in an assault claimed by Islamic State.

It was one of the deadliest militant attacks in Bangladesh, where Islamic State and al Qaeda have claimed a series of killings of liberals and members of religious minorities in the past year. The government has dismissed those claims, as it did the Islamic State claim of responsibility for Friday's attack.

6 members of JMB have been shown as accused

Police believe that Jama'atul Mujahideen Bangladesh (JMB), an outlawed domestic group that has pledged allegiance to Islamic State, played a significant role in organising the band of privileged, educated young men who carried out the attack.

"Six members of JMB have been shown as accused in the case. We are trying to arrest them because they could be the mastermind," Saiful Islam, a senior police officer involved in the investigation, told Reuters.

The JMB has been accused of involvement in many of the killings over the past year and Islam said police were interrogating more than 130 of its members already in custody in the hope of gleaning clues.

"We don't know who is the mastermind behind the attack. We just know that these boys were guided to launch an attack on the restaurant," he said.

"There is no evidence of foreign links," he added.

Police killed six of the attackers when they regained control of the restaurant, 12 hours after the attack began. Two other suspects are in hospital.

Attack marked a major escalation in the scale and brutality of violence

The police on Tuesday also registered a case against five of the six dead attackers, Islam said, which they need to do to begin formal investigations which includes questioning of their families.

The five named in the case filing were Nibras Islam, Rohan Imtiaz, Meer Saameh Mubasheer, Khairul Islam and Shafiqul Islam. It was not immediately clear why the sixth man had not been named in the police report.

The attack marked a major escalation in the scale and brutality of violence aimed at forcing strict Islamic rule in Bangladesh, whose 160 million people are mostly Muslim.

It has shocked the country, as have details emerging about the well-to-do lives of some of the gunmen, five of whom appeared in photographs posted on an Islamic State website, clutching guns and grinning in front of a black flag.

At least three of the gunmen were from wealthy, liberal families who had attended elite Dhaka schools, in contrast to the traditional Bangladeshi militant's path from poverty and a madrassa education to violence.

Three of the attackers had been missing since the beginning of the year, police have said, and little is known about where they went.

Two had attended a private university in Malaysia, one of whom, Nibras Islam, was not particularly religious, according to a student who played football with him at a private college in Dhaka between 2009 and 2011.

"We are in touch with investigators in Malaysia and they are sharing all the information but as of now we have not found any links with international militant groups," Islam said.

One of the dead gunmen was from a poor family and had studied at a madrassa and another hailed from a lower-middle class background, said another senior police official who declined to be identified.

Police said on Saturday five of the attackers were known to authorities and they had previously tried to arrest them. But police have since said little about when and how the men came to be radicalised.