Superintendent Mike Prior, area commander for Somerset, said: “I know the incident in Castle Cary will be of great concern to the local community.

“During this incident, our officers were shot at a number of times and I can confirm that officer weapons were also fired as they attempted to protect themselves and members of the public, in what were extremely challenging circumstances.

“A man has now been arrested and thanks to the professionalism and bravery of our officers, no-one was injured.

“We’ll be maintaining a visible and reassuring police presence in the area and I’d encourage anyone with concerns to speak to their local neighbourhood team.

“We would like to thank the community for the way they have responded, showing patience and being very supportive while we carry out our enquiries.”