The Twin Peaks Tunnel is set to reopen on time after its two-month, $40 million closure, the SFMTA said Thursday.

Subway testing is currently underway between West Portal and Castro stations, with regular service set to return tomorrow, August 25. Shuttle buses and split service for the K-Ingleside, L-Taraval and M-Ocean View lines will be discontinued tomorrow.

The agency added that the NX-Judah Express line is expected to resume service on Monday.

As we previously reported, rehabilitation and replacement of infrastructure in the 100-year-old tunnel began on June 25. The tunnel, which runs between West Portal and Castro stations, needed new tracks, reparation of the walls and ceilings, a new drainage system, seismic upgrades and structural repairs.

Opened for service in February 1918, the 2.27-mile tunnel was the longest of its kind when it was completed. Today, it carries more than 80,000 riders daily, according to the SFMTA.

Photo: SFMTA

The tunnel closure has faced a firestorm of criticism, both for the SFMTA's poor planning for the effort and for the death of a construction worker.

The fatal incident occurred on August 10, when signal technician Patrick Ricketts was pinned by the collapse of a temporary steel beam, later succumbing to his injuries.

After the incident, work was suspended inside the tunnel and all crews were evacuated to secure the construction site so a investigation could be conducted by the California Occupational Safety and Health Administration and the SFPD.

Construction workers were allowed back into the tunnel later that day.

Riders have also complained of severe delays and overcrowding on bus lines citywide, with buses taken off their regular routes to serve as shuttles for the K, L, and M trains.

Mission Local reported that the agency's failure to prepare for the tunnel closure had resulted in service cuts of up to 33 percent on some of the city's busiest and most crowded bus lines.

The agency has countered the criticism by noting that it's currently facing a driver shortage, due to the rising cost of living in San Francisco and the abuses that many drivers face while on the job. Recent track equipment issues also caused service interruptions.

It still astounds me how little regard Muni has for its subway and how casually they close big sections of it for months at a time pic.twitter.com/wcFjisILyc — Eric Fischer (@enf) July 6, 2018

The Twin Peaks tunnel initially connected West Portal and the since-abandoned Eureka Valley station on Market Street. After the Muni Metro-created Castro Station approximately 100 yards to the west, the Eureka Valley station closed in 1972, becoming Bay Area's only ghost station.

In the past, work to improve safety, stability and speed in century-old tunnel has been delayed repeatedly. A planned winter 2016 start date for construction was pushed to April 2017, but before work could commence, Muni canceled the vendor's contract, citing the need for "additional technical analysis."

The tunnel project's completion is now expected in January 2019.