Long Island Rail Road officials canceled at least five trains on five different lines at about 3 p.m. Friday because of a medical emergency involving a passenger in Penn Station, a spokesman said.

The shortage of trains caused delays before the late afternoon rush but Aaron Donovan, the LIRR spokesman, said all lines were on schedule or close to it as of 4:30 p.m.

“At this point, everything is normal and we don’t expect further impact” from the incident, he said, adding the cancellations took place between 3 and 3:30 p.m.

advertisement | advertise on newsday

The railroad issued tweets and recently posted on its website notices about delays and cancellations on the Ronkonkoma, Babylon and Port Washington lines, glitches stemming from the medical emergency, Donovan said.

Other minor delays were sparked by trains that experienced late connections.