A Filipino man who allegedly raped a 17-year-old student was shot dead on Thursday by police in San Jose, Batangas in the Philippines.

The suspect, Loly Pereda, 25, dragged the victim to a grassy area, gagged her with a handkerchief and allegedly raped her, Manila Bulletin reported.

The victim said she was walking home when a man attacked her, and was only able to escape when her attacker heard a tricycle coming towards them. The victim then told her parents what happened, and they reported the matter to the police.

Working with information provided by the victim, the police later spotted Pereda riding a motorcycle with a sidecar. As they approached him, Pereda produced a gun and started shooting. The police retaliated and shot Pereda.

Pereda was rushed to San Jose District Hospital but was pronounced dead on arrival. The police recovered a .38 caliber revolver from the scene of the shooting.