Twelve people have died after being stuck in a three-day traffic jam in Indonesia at an intersection known as “Brexit”.

The traffic stretched for more than 13 miles (21km) at the junction for Brebes, a town on the main island of Java, as millions of people headed home to celebrate Eid al-Fitr. Locals refer to the toll gate at the intersection as Brexit, short for “Brebes exit”.

Indonesia’s roads are choked every year at the end of Ramadan, the month of fasting for Muslims, but the chaos at Brexit was particularly acute this year as tens of thousands of cars crammed on to the arterial highway, said Hemi Pramuraharjo, a transport ministry spokesman.

“In terms of this ‘Brexit’ case, there’s been a total of 12 victims over different days,” he said. The deaths occurred between 3 and 5 July.

Pramuraharjo said several victims were elderly, while others died from fatigue and other health complications. Local media reported that a one-year-old was killed by fumes.

More than 400 motorists have died on Indonesia’s roads during the holiday season, including those in the Brexit jam, Pramuraharjo said.

Accidents are common during this time on Java’s potholed roads. The island is home to 144 million people.

Motorists posted pictures on social media showing cars stuck in miles of queues near the junction. Aerial photos captured a sea of motionless vehicles, with some drivers looking for respite from the jams away from their cars.

Pramuraharjo said roadside vendors and crowded markets near Brexit had compounded the chaos. “There is a bottleneck there, where there’s a petrol station very nearby and many people queue,” he said. “There’s no space on the road. We don’t have a solution.”

The Indonesian health ministry denied earlier reports that the Brexit victims had died in one day, and urged motorists planning a long journey to rest and to take necessary precautions.

Achmad Yurianto, a spokesman for the ministry, said the heavy use of air conditioning could also lead to an increase in carbon dioxide levels in people’s cars.