The railroad arrived in 1834, but its major impact on the town of Berlin, as it was then known, came fifty years later when the Baltimore and Ohio Railroad moved its major rail yard operation there from Martinsburg, West Virginia. In 1890, the United States Postal Service encouraged the town to change its name to Brunswick to avoid confusion in shipping and passenger travel with another Berlin on Maryland's Eastern Shore. Brunswick soon became the site of a seven-mile gravity freight yard, where railroad cars were sorted by rolling down a slight slope to switches that sent them to the desired track. Repair shops and a roundhouse made it a major railroad center from 1890 well into the 20th century. Today Brunswick is a leading commuter station on the Maryland Area Regional Commuter line into Washington, D.C.