Several people are dead and dozens have been injured in a multiple vehicle crash involving as many as 27 cars and lorries on the M5 in Somerset.

Avon and Somerset police said 10 people were believed to have suffered serious injuries following the accident between junctions 23 and 26 northbound at about 8.25pm on Friday.

Police said: "Around 27 vehicles are involved and there are believed to be approximately 35 people injured. Some of these people are seriously injured. Some have tragically lost their lives."

At least four vehicles, including two lorries, caught fire and firefighters using hydraulic cutting equipment had to rescue four people trapped in their vehicles. Television footage of the accident showed members of the public attempting to pry open car doors to help those trapped.

The force of the collision sent debris on to the other side of the carriageway, where tailbacks stretched to junction 22 – about 12 miles away.

Devon and Somerset fire and rescue service said 15 fire teams and 50 firefighters were called in from areas across the county, including Taunton, Glastonbury, Bridgwater and Yeovil. Helicopters were sent to the scene.

Paul Slaven from the rescue service said that "20 light vehicles and six articulated lorries" were involved. He described it as "the worst road traffic collision anyone can remember".

Assistant Chief Constable Anthony Bangham said: "Undoubtedly this is a tragic incident. All emergency services are at the scene and are working tirelessly to attend to those who are injured."

Bangham said there would be a "comprehensive and thorough" investigation of the accident. The cause was not clear but there were reports of wet weather, poor visibility and thick fog in the Bridgwater area. Simon Bruford, 38, from Williton in Somerset, described the scene as "total carnage" as he drove south on the motorway.

"I could see the flames from quite a way back. I spent 18 years in the Somerset fire service and have seen a lot nasty things, but that was horrific," he told the BBC.

Tim Shires, 29, from Bristol, said he was caught in the southbound traffic on his way to Plymouth for work and expected to be stuck for a few hours. "We've been told a couple of helicopters could land on the carriageway," he said. "I've heard helicopters up above but nothing has landed but it's foggy and visibility is poor."

Jaysen Sharpe, a deputy member of the Youth Parliament for Taunton Deane, said he had been at a nearby rugby club when he saw a number of explosions that may have caused by petrol tanks. "I could see the black smoke rising up. There were a number of heavy goods vehicles that were on fire in the accident," he said.

A number of tweeters sent out pleas for information about family and friends.

Visitors to the nearby Bridgwater Guy Fawkes carnival, Europe's largest illuminated procession being held on Friday night, were being diverted from the motorway.

Rob Clayton, from travel news organisation Trafficlink, said people on the southbound stretch of the motorway faced a long wait as police cleared the backlog of traffic along the motorway. The motorway was closed in both directions and police said it was likely to remain shut for up to 24 hours.

A telephone number was set up for those concerned about relatives and friends and the police said they expected lines to be busy. "Before you call this number please make all attempts to contact them via mobile phones or via friends, family or by any other usual measures," Bangham said. The number is 0800 092 0410.