IN THE hours after the worst terrorist attack in Kuwaiti history, scores of citizens lined up to donate blood. Social media erupted with hashtags denouncing sectarian rifts, and Sunni and Shia held prayers side by side. A suicide-blast at the capital’s Imam al-Sadeq mosque on June 26th, which killed 27 Shia worshippers, seemed unlikely to achieve what attackers claiming allegiance to Islamic State (IS) intended. “You have foiled the desperate attempt [to] stir sectarian tensions,” Sheikh Sabah al-Ahmad al-Sabah, the emir, told Kuwaitis a few days later.

Yet behind the calming talk, officials whisper their fears that tensions are on the rise. Hoping to stem the trend, Kuwait’s security forces have cracked down. “We are in a state of war,” Muhammad al-Khaled al-Sabah, the interior minister, told parliament after the attacks. The increased vigilance may well be warranted, but a series of new laws and a string of arrests threaten to squeeze the space for all dissent in Kuwait—long the Gulf region’s most open, semi-democratic state.

In the immediate aftermath of the attack Kuwait’s parliament passed a sweeping new counterterrorism law. It requires all citizens, residents and visitors to Kuwait to provide a DNA sample for a national database. The government has proposed extending the period that the police may detain suspects without charge. Days before the bombing the parliament gave its approval to a new cyber-security law that some say will make it easier for the government to silence critical media. “There is a threat from IS, it’s not just the government being draconian,” says Madeleine Wells, a researcher on Kuwait at George Washington University. “But it also happens to coincide with policies that limit the potential for any opposition.”

Kuwait is an example of how sectarian splits in the region are infecting societies long thought immune. With its 25-30% Shia population, and a diverse mix of Sunni Islamists, tribalists, Salafists and liberals, Kuwait has a well-earned reputation for tolerance. Cross-sectarian coalitions are common in the country’s boisterous parliament. Kuwaitis, especially younger ones, mix with little heed to creed.

Still, the social fabric had shown signs of fraying in the months before the attack. Although Kuwait’s government has stayed on the sidelines in the region’s myriad conflicts, its citizens haven’t been so reserved. Throughout 2012 and 2013, a small group of Kuwaiti clerics and politicians served as a hub for private donations to devout Syrian Sunni rebel groups including an al-Qaeda affiliate, Jabhat al-Nusra. A minority of Kuwaiti Shia, meanwhile, raised the banner of Hizbullah, the Lebanese Shia militia, and vowed to assist the beleaguered Syrian president, Bashar Assad.

Twenty-nine people are now standing trial for the mosque bombing, accused of links to IS. The charge sheet describes how a network hosted, supplied and helped arm a Saudi suicide-bomber. The accused include Kuwaitis, Saudis, Pakistanis and stateless residents of Kuwait.

This is not the first time tensions have flared in Kuwait but the security response now may be the sternest yet. Kuwait is in a difficult neighbourhood and has long feared that regional giants could see it as a soft target in their proxy wars. It now risks following other Gulf states in sacrificing its nascent openness on the altar of security. As the terrorists doubtless wished.