Amtrak service between Maine and Massachusetts returned to normal early Tuesday afternoon, following morning delays caused by a commuter train derailment. Amtrak spokeswoman Patricia Quinn said the derailment of an MBTA commuter train south of Haverhill early Tuesday morning blocked the tracks in both directions.

Passengers on the Downeaster, which runs daily between Portland and Boston, were delayed while they waited for buses to pick them up and take them to their final destination, Quinn said.

The derailment also slowed the morning commute for many riders on the MBTA’s Haverill commuter line into Boston. Additionally, commuter routes were canceled on other lines that originated north of Haverill, including Lowell, Rockport and Newburyport.

The train was not in service when it derailed at about 4 a.m.