Metra service was resuming with residual delays after a Union Pacific engine derailment near a West Side rail yard halted service on several lines Tuesday afternoon.

The Union Pacific switch engine was transporting cars from Ogilvie Transportation Center to a yard near Western Avenue when it derailed about 12:15 p.m. as it was entering the yard, according to Metra spokeswoman Meg Reile. The engine itself was past the switch when it derailed and the switch was not damaged, but the cars it was pulling were blocking the switch.

Train movement on the North Central, Milwaukee District North and Milwaukee District West lines was halted while crews worked to remove the cars, Reile said.

The Metra tracks were cleared and service was resuming with residual delays as of about 2:45 p.m.,┬áReile said. It was not immediately clear whether the evening commute would be impacted, and riders were encouraged to check Metra’s website for the latest delay information for their trains.