Trim is situated on the banks of the River Boyne in an area of fertile plains.
According to legend, St. Patrick and his nephew St. Loman built a church here on land granted to them by the son of the High King. They built it near an ancient ford that crossed the river just beyond the bridge and it was from this that Trim got its name.
The town developed further after the Anglo-Norman conquest, when Hugh de Lacy was granted the lordship of Meath and decided upon Trim as the site of his main caput, or base. He built the great castle at Trim in 1172.
In the 13th century the town was enclosed within a circuit of stone walls. Augustinian (1202), Franciscan (1260), and Dominican (1263) friaries were established, indicating the growing prosperity of the town. In the later medieval period Trim became an increasingly exposed frontier, standing between the (sometimes) hostile worlds of the Anglo-Normans and the Gaelic Irish. Aside from Trim Castle, which dominates the town, the fragments of the medieval town are still clearly visible.