This week British Muslims and Muslims across the world celebrated Eid al-Fitr. After a month of fasting, prayer and reflection there was a time to celebrate and enjoy family meals. Ramadan has been tough this year – not just because of the long, hot summer days, but because of the recent string of attacks on Muslim communities and the shadow of the terrible events of Woolwich in May.

Since the horrific murder of soldier Lee Rigby on the streets of London, we have seen bombs set off at mosques, a school targeted by arsonists, and a Somali community centre razed to the ground. A month earlier we saw the terrible murder of 82-year-old Mohammed Saleem in Birmingham, a horrific crime for which a man has been charged and which police are treating as an act of terrorism.

The reaction to these attacks among the British Muslim community was striking. Their response wasn't to retreat; it was to reach out. This Ramadan, hundreds of community iftars (evening meals, when the fast is broken) have been held across the country. They have united people of all faiths and none, many of whom have never been in a mosque before, breaking bread in order to break down barriers. Many of these were part of the Big Iftar, which culminated with the prime minister's visit to the Jamia Masjid in Manchester on Wednesday.

For me, this was a heartening act of defiance: people who came under attack opening up their doors to the wider community. The Zainabia Islamic Centre in Milton Keynes was firebombed in May and only two months later they were reaching out and hosting a fantastic Big Iftar. Just over a month after a bomb went off nearby, the Aisha mosque in Walsall hosted dozens of people at their community iftar. And when the Muswell Hill Somali community had nowhere to hold their Big Iftar – their centre was burnt down in June – they linked up with their Shia neighbours, the Al-Khoei Foundation, and held their event at their centre in Brent.

These events have been crucial in helping to demystify the faith of Islam – a necessary task. Suspicion of Muslims abounds in this country; excellent research by Matthew Goodwin revealed that around half of the people in Britain thought there would be a clash of civilisations between the west and Islam, and less than a quarter believed that Islam was compatible with the British way of life.

We need to put a stop to this sentiment and any ideas that give rise to Islamophobia. During the prime minister's visit, he was proud to state that this government has done more than any other to tackle anti-Muslim hatred: setting up a cross-government working group on anti-Muslim hatred; funding the first service to record attacks and support victims; encouraging the Association of Chief Police Officers to disaggregate their religious hate crime data, giving a clearer picture of the problem; changing our Prevent strategy to deal with all forms of extremism including far-right extremism and EDL activity – in fact the next extremism task force meeting, set up by the prime minister in the wake of Woolwich, will be focusing on anti-Muslim hatred. This Ramadan we also held the UK's first Srebrenica memorial day, the first time the genocide of 8,000 Muslim men and boys has been commemorated outside Bosnia.

But, of course, there is much more to do. Much of my work as minister for faith and communities is centred on showing that there is no conflict between being British and Muslim. One of the most powerful ways of doing that is highlighting the bravery and loyalty Muslims in the British Indian army – hundreds of thousands of them – who fought for king and country during the first world war. This is just one of the ways, like the Big Iftar, that we can change attitudes and strengthen communities.

After all, the aim of those behind the recent attacks on Muslims, as with those behind the brutal murder of Lee Rigby, was to create division and to try to show that Islam and Britishness are not compatible. How they must have seethed when they saw so many people from all walks of life coming together this Ramadan, and so many Muslims doing what is so very British: keeping calm and carrying on.