A Canadian man who opened fire on a Philippine courtroom today — killing two and wounding another, before dying in the shooting violence — carried a Canadian passport but was born in the U.S., police say.

The man, who was identified by authorities as 63-year-old John Pope, was born in St. Cloud, Minn., Cebu City police's homicide department told CBC News.

Canadian John Pope is seen in this undated file handout photo provided by a court in Cebu City, Philippines on Tuesday. (Cebu Court/Reuters)

Cebu City police added that Pope had a Canadian passport, but could not tell where it was issued.

The passport he had was valid until November 2016, Cebu's Sun Star newspaper said on Twitter. Pope has said he had studied in Ottawa, the newspaper added.

Pope was in court to face illegal possession of firearms and other charges in central Cebu City, where he lived, when he pulled out a gun.

He then shot a lawyer, Giovanni Achas, and Dr. Reynold Rafols, who had filed a case against him, reports said.

Conflicting reports of how gunman died

Authorities say he later shot and seriously wounded an assistant prosecutor in a courthouse stairway, freelance journalist Simone Orendain reported from the Philippines.

"Pope, who was described as a retired journalist, was facing charges of illegal possession of firearms," Orendain reported for CBC News. "In May 2011, his neighbour, the surgeon Dr. Reynold Rafols, told local media he had filed charges of 'malicious mischief' against Pope."

Cebu City police confirmed that Pope had a previous charge of "malicious mischief".

After shooting the prosecutor, it is unclear how Pope was killed.

Police told the Associated Press that Pope was shot and killed by police. But other reports say Pope killed himself after being wounded by responding officers.

Cebu's Sun Star newspaper, citing the National Bureau of Investigation in the Visayas region of the Philippines, reports that two officers shot Pope in the leg before the Canadian shot himself in the head.

Cebu City police told CBC News that Pope had a gunshot wound in the temple, but no one witnessed him shooting himself. Police would not confirm reports that officers shot Pope in the leg.

Gunman reportedly carried 2 firearms

On Tuesday, Pope was carrying two firearms — a .357 revolver that he used to shoot the three, and another .45 pistol that police later seized from his bag, the Philippine Star reported.

Cebu City police said it was standard policy to search people when entering the courthouse and couldn't confirm how Pope brought a gun into the courtroom.

Pope had reportedly lived in the Philippines for several years.

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 complex.

A weapon lies at the scene of a fatal shooting at a courthouse in Cebu in the Philippines. (Courtesy Jophet Budlat/SunStar.com.ph)

Pope was arrested and charged after showing up at Rafols's clinic with a handgun.

Pope had been quoted as saying at the time that the pistol he was carrying was for self-defence.

"I wanted to be prepared," Pope said to ABS-CBN News in the Philippines last year. "This guy, Rafols, once came to my apartment at 2 o'clock in the morning with two armed police officers and an armed bodyguard with their guns out and swung a baseball bat inches from my face."

Pope also wrote an unpublished manuscript titled "Justice Denied," and had been sending parts of it to local newspapers and television stations for some time, Cebu Daily News editor in chief Eileen Mangubat told CBC News.

She added that Pope had been documenting his several run-ins with the law.

Tuesday's shooting came after several recent killings in the country that prompted calls for a tighter gun control.