Castell i Església de Sant Miquel de Montmagastre is a medieval ensemble dating from the early 10th century, located in Artesa de Segre at the summit of the 863-meter Montmagastre hilltop in Catalonia. The castle, of which scant foundations remain, originally featured a typical frontier fortress design with a circular tower and enclosure, dominating an extensive sector of the Segre valley. Below the ruins stands the Romanesque Church of Sant Miquel de Montmagastre, which served as the monastery church, accompanied by remains of the ancient village, cemetery, medieval field systems, and Civil War trenches.