An Alaska Railroad train derailed early Tuesday after running into avalanche debris that covered the tracks, officials said.

The first two cars of the 3,144-foot freight train ran off the track and a third car was partially derailed after colliding with the pile of snow in the Turnagain Arm area south of Girdwood.

Two crew members were aboard the train when it hit the snow field just before 2 a.m., railroad spokesperson Christy Terry told KTUU-TV. The train had just left Whittier and was headed north.

A rescue team of three firefighters and one Alaska Railroad employee crossed the ice and climbed the debris to reach the workers in the train, Girdwood Fire and Rescue said.

AMTRAK PASSENGER STRANDED FOR 20 HOURS SOUNDS OFF ON BEING ‘STUCK IN THE MIDDLE OF NOWHERE’ IN CAROLINAS

train stuck in avalanche debris

An Alaska Railroad train derailed after colliding with avalanche debris that covered the tracks south of Girdwood early Tuesday. (Girdwood Fire and Rescue)

The train workers self-extricated and were escorted away from the area to safety. The train crew was back in service at 4 a.m., officials said.

It’s not known when the avalanche covered the tracks.

Justin Shelby, a spokesman for the Alaska Department of Transportation and Public Facilities, told the Anchorage Daily News that the debris spread about 300 feet across the tracks and was about 30 feet deep.

train stuck in avalanche debris

Officials said two rail workers were aboard the train and were not injured during the incident. (Girdwood Fire and Rescue)

CALIFORNIA SINKHOLE SWALLOWS 2 CARS, FIREFIGHTERS RESCUE TRAPPED MOTHER AND DAUGHTER

Girdwood Fire and Rescue said on Facebook that drivers on the Seward Highway should expect delays in the area Tuesday as the state transportation department undertakes avalanche mitigation efforts.

CLICK HERE TO GET THE FOX NEWS APP

Officials said avalanches in the area are not unusual and urged the public to remember to wear avalanche beacons, practice rescue plans and know the snow avalanche conditions before venturing out.

The Associated Press contributed to this report.