The suspect, John H. Pope, appeared in court in central Cebu city, where he resided, to face the charges when he pulled out a gun and shot a lawyer and a physician who filed a case against him, police said. He then fired at a prosecutor in the hallway of the building before responding police fatally wounded him, said Cebu police chief Mariano Natuel.
Regional police director Marcelo Garbo said Pope ignored orders to surrender and tried to fire at police.
Police said they were investigating Pope's background.
Local media mentioned Pope in 2011, when he was held by police on charges of illegal possession of firearms. The same physician who was killed in Tuesday's shooting accused Pope, his neighbour, of brandishing a weapon and threatening him and other residents in their condominium.
Pope was quoted as saying at the time that the pistol he was carrying was for self-defence. Apart from illegal weapons possession, he was also charged with malicious mischief and grave threats.
The shooting came after several recent killings in the country that prompted calls for a tighter gun control.
Scene of the Crime Operatives (SOCO) of the Philippine National Police examine the scene where prosecutor Maria Teresa Casino was wounded by Canadian national John H. Pope at the Regional Trial Court building in Cebu city in central Philippines Tuesday, Jan. 22, 2013. Pope, a Canadian man facing charges of illegal possession of firearms, opened fire in the Philippine courtroom Tuesday, killing two people and wounding the prosecutor before police fatally shot him. (AP Photo/Chester Baldicantos)
Also on HuffPost