DHAKA (Reuters) - Bangladeshi police on Saturday shot dead a suspected militant who they believe played a key role in an attack on a cafe in Dhaka in July in which 22 people, mostly foreigners, were killed, the national police chief said.

Three women were wounded and arrested in the shootout as police raided a hideout in the capital.

Five officers from the police counter-terrorism unit were also wounded when female militants attacked them with explosives and knives, senior police officer Sahabuddin Qureshi told reporters.

Police chief Shahidul Hoque said the dead man, identified as Abdul Karim, was suspected to be one of the planners of the attack on the cafe, and to have rented a flat for the militants who carried out the assault.

He also said one of the women could be the wife of the man, killed in a shootout with police last week, who was believed to have trained the cafe attackers.

The cafe assault, claimed by the Middle Eastern jihadist group Islamic State, was the most shocking of a series of attacks that has included killings of atheist intellectuals, members of religious and sexual minorities and foreigners.

The government has pinned the blame on domestic militant groups, but security experts say the scale and sophistication of the cafe assault suggest links to a trans-national Islamist network.

U.S. Secretary of State John Kerry said during a visit to Dhaka last month that the United States believed elements of Islamic State were "connected" to operatives in Bangladesh.

Since the July attack, more than two dozen suspected militants, including the presumed mastermind of the cafe assault, Bangladesh-born Canadian citizen Tamim Ahmed Chowdhury, have been killed in shootouts with police.

(Reporting by Ruma Paul)