The passengers who did nothing while a homeless man raped a woman on a commuter train outside Philadelphia may have also recorded the vile attack on their cellphones instead of calling for help, authorities said.

Surveillance footage showed Fiston Ngoy, 35, who has been charged with rape in Wednesday’s sickening attack aboard a Southeastern Pennsylvania Transportation Authority train, spent nearly 45 minutes harassing the woman and touched her breast at one point, according to an arrest affidavit obtained by the Philadelphia Inquirer.

Police said the rape lasted about six minutes as other passengers looked on while holding their cellphones, but didn’t use the devices to call 911, SEPTA’s police chief said Monday.

PHILADELPHIA-AREA STRAPHANGERS WHO MAY HAVE FILMED RAPE COULD FACE CHARGES: REPORT

"We want everyone to be angry, disgusted and to join us in being resolute in keeping our system safe," Chief Thomas Nestel III told reporters. "We need the public to notify us when they see something that seems to be unusual."

Fiston Ngoy (Delaware County Jail) (Delaware County Jail)

The woman had tried to stop Ngoy prior to the sexual assault, a SEPTA spokesman told the New York Times.

"Then, unfortunately, he proceeded to rip her clothes off," SEPTA spokesman Andrew Busch said Sunday.

It’s unclear how many other passengers were in the car of the westbound train on the Market-Frankford Line, but Upper Darby police Superintendent Timothy Bernhardt said the attack might have been prevented if someone had gotten involved.

WOMAN RAPED ON TRAIN AS BYSTANDERS DID NOTHING, POLICE SAY

"I’m appalled by those who did nothing to help this woman," Bernhardt told the Times. "Anybody that was on that train has to look in the mirror and ask why they didn’t intervene or why they didn’t do something."

The bystanders who failed to intervene could be criminally charged if they recorded the attack, Bernhardt said, but the decision would be up to local prosecutors after cops wrap up their investigation.

Pennsylvania does not have a good Samaritan law, so it’ll be "very difficult to bring charges" against anyone who witnessed the attack but didn’t call 911 or offer help, Bernhardt said.

Authorities have not released the surveillance video and Nestel refused Monday to give an approximate number of witnesses to the alleged sexual assault.

Unidentified person walks by Philadelphia Police Ford Explorer (iStock).

"I can tell you that people were holding their phone up in the direction of this woman being attacked," Nestel said.

An off-duty SEPTA employee called transit cops, who arrived minutes later to interrupt the assault and arrest Ngoy, who listed a shelter in Philadelphia as his last address. He later told investigators he struck up a conversation with the woman, claiming the sexual encounter was consensual and that she didn’t stop his advances, the Inquirer reported.

CLICK HERE TO GET THE FOX NEWS APP

The woman told cops that version of events was false, saying Ngoy ignored her pleas for him to leave her alone, the police affidavit states.

Ngoy remained jailed Monday on $180,000 bail on charges of rape and related offenses. He’s due in court for a preliminary hearing in Upper Darby on Monday, the Inquirer reported. He had not requested a public defender as of Monday, court records show.

With Post wires

This report originally appeared in the New York Post.