A homeless man was arrested for a bloody stabbing rampage at Penn Station on Sunday evening that left five innocent bystanders with knife wounds, sources told The Post.

Hector Deleon, 51, unleashed the unprovoked attack around 7 p.m. inside the New Jersey Transit boarding area. The assault filled the station with the blood-curdling screams of victims as crowds of terrified commuters ran for their lives, sources said.

Deleon is believed to be homeless, the sources said. He was previously arrested in New Jersey in May on assault and narcotics charges, though details of that arrest were not immediately available.

The grisly attack occurred less than 24 hours before President Trump is expected to arrive at Madison Square Garden for Game 3 of the Knicks’ historic NBA Finals appearance against the San Antonio Spurs.

Sources told The Post that the victims — all men ranging in age from 30 to 60 — were innocent bystanders who were attacked by the deranged suspect after he brandished a knife at them.

Straphangers told The Post on Monday that they were disturbed by the attack, which left splatters of blood on the floor of the boarding area.

“Wow, I mean, I guess I’m not surprised, though. Penn Station is not known for being the safest area, especially in the evening, and especially with how busy it’s been recently with the Knicks games and Trump coming,” said Sanai Rashid, 21.

“It’s been a bit of a messy summer in general. I think crime does go up as well, but I do think there probably should be more security in Penn Station. That’s devastating.”

Marina Berger, 21, an advertising intern from New Jersey, said the incident particularly frightens her as a solo female traveler.

“It’s definitely very upsetting to hear, especially as a young woman who’s going to have to commute to the city pretty often. I definitely think there should be better security measures put in place.”

Emma, 30, a dental hygienist who was outside Penn Station with her 7-year-old son, Leonardo, said the incident made her think twice about riding the rails.

“It freaks you out. It makes you wonder if you should even be using the subway with your kids,” she said. “There’s always creepy people in the subway, but you never really think that you’re gonna be there when something like that happens.”