As Bangladesh comes to grip with the horrific terrorist attack July 1 at a café in an upscale neighborhood in Dhaka, the Sheikh Hasina government must focus on shutting down local Islamist militant groups and cooperating closely with U.S. authorities to determine whether the terrorists had operational links to global groups.

The attack, which involved a 12-hour hostage siege, left at least 20 hostages and two Bangladeshi security personnel dead. The victims included nine Italian, seven Japanese, one Indian, two Bangladeshi, and one U.S. citizen of Bangladeshi origin. Three of the victims were students at U.S. colleges.

According to media reports, the six attackers were all Bangladeshi, and five of them were individuals the local police had tried to arrest previously. The attackers had asked the hostages to recite verses from the Koran, and those who could not were brutally tortured and killed, according to survivors of the ordeal.

In the last three years, religious extremists in Bangladesh have stepped up their attacks, systematically murdering liberal bloggers, writers, professors, and activists, as well as members of the minority Hindu community.

The attacks appear aimed at silencing free speech and Islamizing Bangladeshi society.

There also appears to be competition between terrorists claiming allegiance to al-Qaeda and those associating with the Islamic State (ISIS). The Bangladeshi authorities arrested several members of a local terrorist group, Jamaat-ul-Mujahideen Bangladesh, in 2015 for making or attempting to make contact with ISIS.

In another sign of its growing interest in Bangladesh, ISIS recently published a five-page article titled, “The Revival of Jihad in Bengal,” in its flagship magazine “Dabiq,” which warned of further attacks against Westerners in Bangladesh.

Al-Qaeda has also turned more of its attention to Bangladesh in recent years. In September 2014, when al-Qaeda leader Ayman al-Zawahiri launched its South Asia wing (al-Qaeda in the Indian Subcontinent), Zawahiri released a video that assured Muslims in India, Bangladesh, and Burma that the organization would help “rescue” them from injustice and persecution.

In January 2014, Zawahiri released an audio message calling on Bangladeshis to rise up against the state.

The Hasina government has blamed previous extremist attacks on the political opposition. But given the demonstrated ISIS and al-Qaeda interest in Bangladesh, it does not make sense for the Bangladeshi government to dismiss out of hand any connections of the attacks to global terrorist movements.

The July 1 attack was a planned and coordinated event that was at least inspired by ISIS ideology, although ISIS operatives may or may not have directed the attack. Either way, it is clear that Bangladesh has a serious Islamist extremist problem on its hands, and simply blaming the political opposition is not an acceptable response.

Moving forward, the U.S. must insist on fully transparent and joint investigations of this and previous attacks to determine any potential global linkages and how the terrorist networks can be crushed.

Hasina deserves credit for emphasizing the secular principles of the country’s founding. However, her government must now focus on putting into place the security measures necessary to protect those who want to uphold these principles.