The Royal Canadian Mounted Police said Thursday that they had arrested at least 40 people in eastern New Brunswick at a violent protest over shale gas development. The R.C.M.P. said the protesters had engaged in firearms violations, threats, intimidation, mischief and the violation of a court-ordered injunction near Rexton. At least five police vehicles were set on fire. The police began enforcing the injunction on Thursday at a site where the energy company SWN Resources, owned by Southwestern Energy, stores exploration equipment. The protesters want the company to stop seismic testing, and they contend that the process used to extract shale gas — hydraulic fracturing, also known as fracking — could pollute drinking water.