There was originally a Roman castellum (Castellum Laurum) in Woerden, as part of the limes of the Roman Empire and thus part of the defense lines of the northern border of the Roman Empire. The first castellum was built in the 40s AD, and was destroyed in 69 AD during the Batavian rebellion. In 70 AD the castellum was rebuilt, and the Romans remained until 402 AD, with an interruption lasting from about 275-300 AD. The Castellum was located at the present site of the medieval Petruschurch and surrounding church yard. During construction work on a new underground parking facility in the city center of Woerden, the remains of numerous old Roman buildings and a Roman cargo ship were found.
The current castle was built in around 1160 by bishop Godfrey van Rhenen. Due to its strategic location on the border between the County of Holland and the Bishopric of Utrecht, various wars have been fought in and around Woerden. In 1410 John III, Duke of Bavaria-Straubing reconstructed the castle.
Until the 19th century the castle was used as a prison. There's even a pit prison in the northwest tower, which was used for unruly prisoners. In the 20th century the castle was part of military barracks and used for storage of all kinds of goods but poorly maintained. This caused severe decay. Today it is restored as a restaurant.
References:The Basilica of Santa Maria in Trastevere is one of the oldest churches of Rome. The basic floor plan and wall structure of the church date back to the 340s, and much of the structure to 1140-43. The first sanctuary was built in 221 and 227 by Pope Callixtus I and later completed by Pope Julius I.
The inscription on the episcopal throne states that this is the first church in Rome dedicated to Mary, mother of Jesus, although some claim that privilege belongs to the Basilica di Santa Maria Maggiore. A Christian house-church was founded here about 220 by Pope Saint Callixtus I (217-222) on the site of the Taberna meritoria, a refuge for retired soldiers. The area was made available for Christian use by Emperor Alexander Severus when he settled a dispute between the Christians and tavern-keepers.
The church underwent two restorations in the fifth and eighth centuries and in 1140-43 it was re-erected on its old foundations under Pope Innocent II.