Coal had been mined in the area since at least the 12th century, but the number of pits increased ten-fold as demand for coal grew in the Victorian period. Previously rural villages such as Cowdenbeath rapidly swelled into towns as thousands moved to Fife to find work in its mines. The opening of the Forth and Tay rail bridges linked Fife with Dundee and Edinburgh and allowed the rapid transport of goods.