The county was created on September 10, 1784, out of land originally part of Philadelphia County. The first courthouse was housed in the Barley Sheaf Inn. It is believed to have been named either for Richard Montgomery, an American Revolutionary War general killed in 1775 while attempting to capture Quebec City, or for the Welsh county of Montgomeryshire (which was named after one of William the Conqueror's main counselors, Roger de Montgomerie), as it was part of the Welsh Tract, an area of Pennsylvania settled by Quakers from Wales. Early histories of the county indicate the origin of the county's name as uncertain.