Graft-ridden Indonesia is home to one of Asia's most inefficient bureaucracies

Indonesia's notorious traffic congestion was on display for the world Thursday after the country's president was forced to walk two kilometres through the scorching heat to attend a military parade.

Graft-ridden Indonesia is home to one of Asia's most inefficient bureaucracies and gridlock plagues many of the archipelago's largest towns.

The country's traffic nightmares were aptly illustrated when President Joko Widodo had to walk more than two kilometres to attend a ceremony marking the 72nd anniversary of the Indonesian military's founding.

Widodo and senior government officials were held up by gridlock as they approached the military parade in Cilegon, a port city about two-and-a-half hours drive from the capital Jakarta, the presidential palace said.

After a 30-minute wait, "the president then decided from inside the car that he would walk," Widodo's guard Ili Dasili said in a statement.

National police chief Tito Karnavian, who was also stuck in the jam, joined the president.

Video footage shows the president walking with a phalanx of security personnel while spectators yell and chant his name.

Widodo's unorthodox entrance wasn't lost on social media users, who questioned why the leader of Southeast Asia's largest economy was compelled to walk to the event.

"How come the president walked for two kilometres to the military anniversary location, why didn't they give him the privilege of vacating the road or taking him in a helicopter?" Twitter user @Pujithegooners wrote.