Garrett County (/ɡərɛt/) is the westernmost county of the U.S. state of Maryland completely within the Appalachian Mountains. As of the 2020 census, the population was 28,806, making it the third-least populous county in Maryland. Its county seat is Oakland. The county was named for John Work Garrett (1820–1884), president of the Baltimore and Ohio Railroad. Created from Allegany County in 1872, it was the last Maryland county to be formed.