Maryland Route 77 (MD 77) is a state highway in the U.S. state of Maryland. The state highway runs from MD 64 in Smithsburg east to MD 194 in Keymar. MD 77 is the main east-west highway of northern Frederick County. The state highway connects Thurmont with eastern Washington County via Foxville, which lies between South Mountain and Catoctin Mountain near Catoctin Mountain Park and Cunningham Falls State Park. MD 77 links Thurmont with western Carroll County through the communities of Graceham, Rocky Ridge, and Detour in the Monocacy River valley. MD 77 was constructed from Thurmont east to Detour in the 1920s and early 1930s. A disjoint section of MD 77 was built between Cavetown and Foxville in the late 1930s. The portions of the modern highway between Foxville and Thurmont and from Detour to Keymar were county highways until they were designated part of MD 77 in 1956. MD 77's western terminus was moved east to MD 64 in Smithsburg in 1960.