Media playback is unsupported on your device Media caption Young Muhammad Musa Khan was one of more than 30 people charged with attempting to kill police officers as the BBC's Mike Wooldridge reports

A Pakistani court has withdrawn the case against a nine-month-old baby who was accused of attempted murder alongside 12 members of his family.

Muhammad Musa Khan appeared in court in Lahore for a second time on charges of planning a murder, threatening police and interfering in state affairs.

But the judge said the case should never have come to court.

Police chiefs earlier said they had ordered action against an investigating officer.

'Little celebrity'

Nine-month-old Musa Khan will not, of course, remember the stir he has caused by his two appearances in court. But the widespread incredulity that he could ever have been brought before a judge - and for attempted murder - has certainly revived debate in Pakistan about flaws in the judicial system. Embarrassed police chiefs readily agreed that it should not have happened and said an investigating officer would be disciplined. It has been suggested that poor training and pay in the police does not help. It also appears there may be more to the case than the confrontation between police and protestors that led to the attempted murder investigation - in particular a land dispute of some kind. The case against Musa's adult relatives continues. But we can assume that when he left court in his grandmother's arms he took the spotlight on the case - and maybe the prospect of imminent reform - away with him.

Despite his young age, Muhammad Musa Khan was one of more than 30 people charged with attempting to kill police officers during a confrontation over electricity and gas supplies in the city of Lahore.

Pakistan media broadcast images of the infant in his first court appearance, sitting on his grandfather's lap and clasping a bottle of milk.

His grandfather asked journalists covering the case: "He doesn't even know how to pick up his milk bottle properly. How can he stone the police?"

But Musa was much calmer in Saturday's court appearance compared to his first, when he cried as his fingerprints were taken, says the BBC's Mike Wooldridge in Lahore.

Little Musa Khan has become something of a celebrity well beyond Pakistan's borders for his appearance in a Lahore court, adds our correspondent.

The case against the rest of Musa's family is still proceeding.