Sub-freezing temperatures caused rush-hour delays on four of Metro’s five lines Wednesday morning, cracking sections of rail along two stretches of track and turning an already cold commute into a frigid marathon for some riders.

Temperatures in the Washington region went from a balmy 60 degrees on Sunday to the 40s on Monday and then dropped to 17 degrees at Reagan National Airport by Wednesday morning, according to the National Weather Service.

That caused a shock to the steel rails on Metro’s tracks, said Metro’s chief spokesman, Dan Stessel.

“When you go from mild temperatures [to] a sharp and sudden drop in temperatures, the metal rails contract, and cracks can develop,” he said.

On the Yellow Line, a four-inch gap opened in a rail along the bridge across the Potomac River, Stessel said, and a quarter-inch gap was found in a rail on the Red Line near the Takoma station.

The Yellow Line crack was detected about 6:30 a.m., Stessel said, when a light signaled that there was a problem. The crack on the Red Line was detected about 7:30 a.m. in a similar way, he said.

It can be unsafe to run trains over cracked rail lines, so rail service had to be suspended, and inbound and outbound trains shared a single track on both the Yellow and Red lines, Stessel said. Riders on the Blue and Green lines experienced delays because of congestion near the Potomac River bridge.

Because the Yellow Line shares track with the Blue and Green lines, Yellow Line trains were “stacking up to go over the bridge” as trains were single-tracking through the area, said Stessel. That left Blue Line trains waiting with “nowhere to go,” he said.

Stessel said delays ran 20 to 30 minutes, but some commuters said their trips to work were lengthened even more when they factored in their waits.

A nearly 40-foot piece of rail was replaced on the Yellow Line after rush hour, Stessel said. The Red Line crack was temporarily bridged with a “splice bar” that held the pieces together so trains could use that section of track.

By 1 p.m., a piece of 40-foot rail went into place on the Red Line to permanently replace the cracked rail, Stessel said.

Subways and railroads say it is not uncommon for the cold to cause issues.

In Long Island on Wednesday morning, broken rail lines due to the cold weather caused 30-minute delays, said Salvatore Arena, a spokesman for the Long Island Rail Road.

But the Virginia Railway Express, which operates on rail tracks owned by CSX and Norfolk-Southern, said heavier gauge steel means they don’t have to deal frequently with cracked rails. Like Metro, though, VRE and Maryland Area Regional Commuter trains can face delays in the heat of summer when rails expand and kinks develop.

Richard Maloney, spokesman for the Southeastern Pennsylvania Transportation Authority, said that his transit system has not had cracked-rail problems but that sudden changes in temperatures can cause other issues.

“Any big system, like WMATA or New York, when you have a sudden change in temperature, you’re going to have mechanical problems. It is the nature of the business,” he said.

The change in weather this week caused problems with the rail car doors in Philadelphia, which tend to stick when the temperature swings, he said.