Philippine police stormed a courtroom to end a two-day hostage crisis Wednesday, killing the gunman and freeing all four captives who were held by a movie stuntman and his common-law wife. Gunshots and a blast rang out inside the Taguig city court in suburban Manila as black-clad SWAT teams went in. Moments later, Mayor Sigfrido Tinga confirmed the gunman, Al Bautista, was fatally shot and the hostages rescued. Bautista's wife was in custody. Two hostages were injured after one was pistol-whipped on the head by the suspect and another was kicked and punched during the 24-hour standoff. "The crisis is over," said Metropolitan Police Chief Superintendent Reynaldo Varilla, one of the negotiators. "The good thing is all hostages are safe and only the hostage-taker is dead," he said. As the crisis dragged into its second day, Varilla said he and other negotiators convinced Bautista to surrender. But as the captives piled out of the courtroom, Bautista apparently changed his mind and fired at a policeman, missing him. The officer fired back and in the confusion, Bautista dropped a grenade, which exploded, killing him instantly, Varilla said. TV footage showed Bautista's bloody remains sprawled on the floor, his right hand badly burned. The drama began Tuesday afternoon when Bautista - earlier identified by police as Almario Villegas - pulled a pistol after a disagreement during a preliminary hearing over a land dispute between his partner and another woman, Tinga said. A stenographer was able to escape, but Bautista and his common-law wife held on to the female complainant in the case, the court clerk, another stenographer and a lawyer, city spokeswoman Anna Santos said. Villegas bragged he had a grenade and was a member of the Philippine marines, which denied he belonged to their elite unit. Associated Press Television News footage showed Bautista in a red shirt brandishing a pistol and grenade inside the court. At one point, he kicked a hostage, gave a menacing stare at journalists gathered outside and briefly pointed his gun at them. Supreme Court Chief Justice Renato Puno arrived briefly at the scene early Wednesday and told negotiators he hoped the standoff would end peacefully. He gave an assurance that the land dispute would be handled fairly. Tinga said earlier the couple made no specific demands, but ABS-CBN television reported the pair demanded 3 million pesos (US$62,500; â‚¬47,000) in ransom. Tinga and police officials, who negotiated via cell phones, said they wanted to end the drama peacefully but were left with no choice when Bautista opened fire. Tinga helped deal with a 2005 uprising by captured al-Qaida-linked Abu Sayyaf guerrilla commanders, who took over a prison building in a police camp near the Taguig court building. Police special forces stormed the prison, killing 22 people, most of them guerrillas.