A 66-year-old Canadian man opened fire inside a courtroom in the central Philippine province of Cebu on Tuesday, killing a doctor and a lawyer before shooting and killing himself, police said.
John Pope, charged with "malicious mischief and grave threat", pulled out his gun minutes before the hearing began.
He shot the prosecutor and the doctor and left the court during the commotion that followed. It was not clear how he was able to carry a handgun into the court premises.
While walking towards the lobby of a building opposite to the court, he shot the state prosecutor handling his case at point-blank range. The prosecutor was in critical condition in hospital, the National Bureau of Investigation said.
Police said they shot Pope in the arm, but he also shot himself in the dead after falling to the floor, the bureau said.
Prosecutor General Claro Arellano said in a statement it was clear there was a "serious lapse in security" in the court premises, calling on the Supreme Court, overseer of courts all over the country, to investigate.