Dilsberg Castle () is a ruined castle located in Neckargemünd, Germany. It was built by the counts of Lauffen in the 12th century, but in the 14th century became part of the Electorate of the Palatinate. The castle became an administrative center for the Electoral Palatinate and thus a target in the wars of the 17th and 18th centuries. In the 19th century, the castle fell into ruin and was used as a quarry. American writer Mark Twain visited the castle in the 1870s and wrote about it in A Tramp Abroad. As of 2020, Dilsberg Castle is administered by the heritage agency . History Dilsberg Castle was constructed in the mid-12th century by the to replace at Wiesenbach. The castle was also intended to secure the power of the Counts of Lauffen over the area against that of the Heidelberg-based Electorate of the Palatinate. The Counts of Lauffen died out at the start of the 13th century, however, and the castle passed to the and then, in 1310, to the Palatinate. To solidify his own control over the area, Rupert I expanded the castle with recycled stone from the old curtain wall. Rupert I also established a town, , at the castle by moving nearby townspeople to the fortress to create new tax income. A garrison was assigned to the castle and the town would become an important administrative center in the Palatinate. It was given town rights in 1347, but in the long term Rupert I's plan failed as Dilsberg was isolated from important roadways. As siege weapons grew more powerful, the military importance of Dilsberg declined. By the end of the 19th century, Dilsberg Castle had become the property of the government of Grand Duchy of Baden and was used as a prison. Around 1822, the castle was abandoned and became a public quarry. Beginning in the mid-19th century, Dilsberg Castle's ruins began appearing in the work of artists such as J. M. W. Turner, Carl Rottmann and , and even in Mark Twain's work, when he wrote about a legendary tunnel under the castle in A Tramp Abroad. Public interest in the castle grew during the 20th century, inspiring tourism and prompting the reconstruction of some of the castle, and the restoration of Dilsberg's town center. Architecture The first iteration of Dilsberg Castle was a simple, oval-shaped hilltop castle with a moat, curtain wall, and tower