馬里蘭區域通勤鐵路
In the 2002 gubernatorial election, Republican Robert Ehrlich defeated Democrat Kathleen Kennedy Townsend to become the first Republican governor of Maryland since Spiro Agnew in 1969. Governor Ehrlich appointed Flanagan to Maryland Secretary of Transportation. In this position, Flanagan managed the Port of Baltimore, Baltimore Washington International Airport, the Maryland Motor Vehicle Administration, the various transportation entities, such as the MARC Train, the Baltimore Light Rail, the Baltimore Subway, and the Maryland Transit Administration.