Sunday’s Marine Corps Marathon and Metro’s aggressive maintenance schedule are going to make the weekend Metrorail schedule very complicated. The transit authority will add service for the marathon, but all weekend, the schedules on the Red, Green, Yellow and Orange lines will be disrupted.

On the Red Line, Metro’s busiest, work at the Farragut North station will require trains to share a single track through downtown D.C. Meanwhile, repairs on the Green Line will shut four stations. Here’s the full schedule for the work that will begin at 10 p.m. Friday and continue through the rail system’s closing at midnight Sunday.

Green/Yellow lines

Waterfront, Navy Yard, Anacostia and Congress Heights stations will be closed. Free shuttle buses will replace trains between L’Enfant Plaza and Southern Avenue. Green Line trains will operate in two sections, one between Greenbelt and Huntington and the other between Branch Avenue and Southern Avenue.

During this time, workers will be installing new switches outside the Navy Yard station and preparing for installation of new switches outside Anacostia station.

Shuttle bus service will operate between L’Enfant Plaza and Southern Avenue, with stops at Waterfront, Navy Yard, Anacostia and Congress Heights. An express shuttle will operate between L’Enfant Plaza and Southern Avenue with a stop at Anacostia station.

The last train will depart Branch Avenue 20 minutes earlier than usual, at 2:04 a.m. Saturday and Sunday and at 11:04 p.m. Sunday. (People planning to attend Halloween celebrations should pay particular attention to these early departures.)

Riders using the shuttles should allow at 30 minutes of additional travel time.

The Yellow Line trains will operate between Huntington and Greenbelt throughout the weekend.

Red Line

Trains will share a track between Dupont Circle and Judiciary Square. This will clear a safe work zone at Farragut North, where crews will continue work on the city pipes above the station’s ceiling.

From 9:30 a.m. to 9 p.m. Saturday and Sunday, trains will depart every 10 minutes from the ends of the line at Shady Grove and Glenmont. Every other train from Shady Grove station will end its run at Dupont Circle, and every other train from Glenmont will terminate at Union Station.

At all other times, Red Line trains will leave the ends of the line about every 20 minutes. A train from each direction will go through the work zone about every 20 minutes. This will create crowding. Metro suggests that riders consider Metrobus and the D.C. Circulator buses as alternatives through downtown.

The last trains from Glenmont will leave 11 minutes earlier than usual on the weekend nights: 2:26 a.m. Saturday and Sunday, and 11:26 p.m. Sunday. (This schedule also is worthy of note for people planning Halloween celebrations.)

Orange Line

Trains will share a track between New Carrollton and Cheverly while workers install new rails and perform other maintenance.

Every other Orange Line train in the direction of New Carrollton will terminate at Cheverly and return to Vienna. Allow about 20 minutes extra to get through the work zone.

Marathon schedule

Because of the marathon, Metro will add service on Sunday. The rail system will open at 5 a.m., two hours earlier than normal. Extra trains will operate on the Blue Line from from 5 to 9 a.m. and from 11:30 a.m. to   3:30 p.m.

Runners should use the Pentagon station to reach the start line. The Arlington Cemetery station won’t open until after the race starts. Buses that normally use the Pentagon Transit Center will be moved to the Pentagon City station between 4 a.m. and 4 p.m.