ISLAMABAD — A Pakistani judge dismissed an attempted murder charge Saturday that police lodged against a 9-month-old boy, ending a bizarre case that drew new criticism to the country’s troubled criminal justice system.

The family of Mohammad Musa had kept the boy in hiding after authorities pressed charges accusing him of trying to kill police officers after a neighborhood brawl in Pakistan’s eastern city of Lahore. Judge Rafaqat Ali Qamar dropped the case against the boy, defense lawyer Irfan Tarar said.

The case stems from an incident Jan. 31, when power company officials went into the boy’s neighborhood to disconnect illegal power lines allowing people to get electricity to their homes without paying for it. Such pilferage is common in Pakistan, and attempts to disconnect customers can be met with violence.

Police said in this case, neighbors threw stones at energy company officials and their officers. That sparked police to open an attempted murder investigation into 30 people in the neighborhood, including the father of the 9-month-old and his son.