The LIRR was plagued by delays and cancellations Tuesday night after signal problems in Freeport and a crash in Bethpage, angering commuters and fans headed to the Islanders game in Brooklyn.

A westbound train on the Ronkonkoma branch clipped a truck near the tracks at about 5:30 p.m. in Bethpage, just east of the station at the Broadway crossing, authorities said, but there were no injuries.

Those problems came on top of headaches caused when the signal system broke down in Freeport shortly before 5 p.m., leading to an hour-long suspension of westbound service on the Babylon branch and delays that endured past rush hour, the Long Island Rail Road said.

Backed-up trains caused a “shortage of equipment” on several branches, leading to canceled trains, according to LIRR tweets. When trains are delayed in finishing their trips, they cannot embark on the next leg of their schedules, leaving riders in both directions waiting.

Ten trains were canceled and 64 delayed — about half of the rush hour trains — mostly on the Ronkokoma and Babylon branches, with limited delays spilling over to five other branches, said Salvatore Arena, spokesman for the Metropolitan Transportation Authority.

Most trains were running on or close to schedule shortly after 8 p.m.

advertisement | advertise on newsday

LIRR officials are investigating the cause of the signal breakdown, which resulted in delays of 45 minutes on the branch, Arena said. But the commuter railroad warned of longer delays, up to 72 minutes on the 4:03 train from Penn to Babylon.

In the crash, photos of the scene showed the front of a CVS tractor-trailer mashed against the side of a train car and the crossing gate in the down position between the truck’s cab and trailer.

MTA police believe the truck driver was trying to back into the CVS parking lot on Broadway when the crossing gate came down ahead of the Penn-bound train and the truck got stuck in traffic.

“With the driver unable to move the truck, with cars in front and behind him, the train clipped the truck, striking the front bumper,” Arena said.

Trains in both directions were delayed up to 90 minutes on the Ronkonkoma branch, he said.

Riders took to Twitter to blast out complaints and also tweet photos of the crash taken from inside their train.

“It’s my absolute favorite when the #LIRR tries to make announcements and they just mumble incoherently,” one rider tweeted. “Thanks for update.”

One person temporarily stranded at Penn Station wrote, “Been in Penn for 40 minutes waiting another 20 for next train all @lirr trains are canceled or too crowded to fit @MTA #lirr bunch of crooks.”

A few hockey fans said they expected to be late for the 7 p.m. game between the Islanders and the Panthers at the Barclays Center.

Just before 6 p.m., one ticket holder tweeted to CVS, “All I’m saying is @CVS_Extra owes me islanders tickets.”