Nearly 18 people have died during a massive three-day traffic jam stretching for more than 21 km in Indonesia.

Commuters travelling between Jakarta and the city of Tegal faced the challenging traffic situation at a major highway junction in Brebes, a city on the main island of Java. The roads were choked as people were going to their hometowns to celebrate the religious holiday of Eid.

The Chief Medical Officer of Brebes, Gunadi Parwoko, said that 12 people died after being stuck in traffic jams, while five people died in crashes. He added that another person died of a different cause.

Another victim, who had complained of dizziness when the bus he was travelling in got held up in traffic, was taken to a nearby health centre, and was pronounced dead at the hospital. The condition of several victims was made worse by the stress and heat.

The traffic jams made it even more difficult for emergency services to reach the unwell people.

Indonesian President Joko "Jokowi" Widodo blamed the bad infrastructure of the toll roads for the incident. He said that the vehicles are supposed to wait in a queue to pay the toll and traffic jams at toll gates were not unexpected.

Jokowi hoped that measures would be taken to reduce the problem within two years.

Cabinet Secretary Pramono Anung said that the government had expected traffic jams on the newly-inaugurated toll road. But in spite of the knowledge, no measures were taken to prevent the situation, which resulted in so many deaths.