The family of a Pakistani baby charged with attempted murder say they have been forced into hiding after coming under intense pressure from the police, who are facing national humiliation over the incident.

One police officer has been suspended and an official inquiry has been ordered into how nine-month-old Musa Khan was booked in Lahore for supposedly taking part in a riot in one of the city's slums.

The country's media have highlighted the absurdity of the charge after the boy attended court last week, during which he cried while having his fingerprints recorded and had to be comforted with a milk bottle.

The episode has a shone an embarrassing light on Pakistan's shambolic criminal justice system, where underpaid and ill-trained police can be quick to lay false charges that can ensnare the innocent in years of legal troubles.

"We have had to move to a secret place because we are poor and the police are putting huge pressure on us to manipulate the case," said Muhammad Yasin, the boy's grandfather.

He rejected police claims reported in local media that the family had produced "the wrong baby" before the court in order to undermine the police case.

Musa was among five people identified in a police document known as a first information report (FIR) following disturbances in February in a slum area of Lahore when workers for a gas company came to try to disconnect houses that had not paid their bills.

According to the FIR, written by a now suspended assistant sub-inspector, Musa and his co-accused tried to kill the gas company workers and the policemen accompanying them by throwing stones.

The people living in the area maintain there was only ever a peaceful protest. "There were only women in the houses at daytime and they resisted this discontinuing of supply," Yasin said. "Later we blocked the road and raised slogans against police."

Lawyers say it is all too common for police to resort to collective punishment of entire families, often at the instigation of the complainant. "Most of the time people don't really want justice at the hands of the courts," said Sundas Hoorain, a lawyer who specialises in murder cases. "It is really all about taking revenge, and that means making the other party suffer as much as possible by putting whole families through hell."

It is a practice that often throws up legal absurdities. Hoorain said she worked on one case where men co-accused of murder submitted their passports to prove they were not even in the country at the time of the killing. "It's a practice that means the guilty go free because the credibility of the entire case is compromised," she said.

The charging of toddlers is relatively rare, although there are examples of young children being ensnared in the country's blasphemy laws, which have been much criticised by human rights groups.

Shahbaz Sharif, the powerful chief minister of Punjab, Pakistan's largest province, has ordered an inquiry into the matter.

Irfan Sadiq Tarar, the family's lawyer, said the penal code made it impossible for children under the age of seven to be considered to have committed a criminal offence. "The case questions the efficiency of the Punjab police," he said.

The judge in the case, who granted Musa bail until the next hearing on Saturday, has demanded an explanation from the police.

Shaukat Javed, a former Punjab police chief, called for a complete overhaul police procedures so that the FIR was not considered a "sacred document". "We need reforms, but it requires political will," he said.