A Canadian man facing charges of illegal possession of firearms shot dead two people and injured one after opening fire at Philippine court before turning the gun onto himself.
John H Pope, the suspect, was facing charges at a court in the central city of Cebu, when he opened fire and fatally shot a lawyer and physician who filed the case against him.
Mariano Natuel, Cebu police chief, said that 66-year-old Pope also fired at a prosecutor, who is now in critical condition in hospital.
Conflicting reports say that the police on site shot the gunman, but the police say that they shot Pope in the arm before he shot himself in the head.
He added that the shooter ignored orders to surrender and shot at the police.
Pope was facing charges of possession of firearms and malicious mischief and grave threats. He was previously held for the same charges in 2011.
The prosecutor was in critical condition in hospital.
Claro Arellano, the prosecutor general, said that there was a "serious lapse in security" in the court premises calling an investigation by the Supreme Court.
The shooting came after several recent killings in the country prompted for a tighter gun control.