Medininkai Castle (Lithuanian: Medininkų pilis), a medieval castle in Vilnius district, Lithuania, was built in the late 13th century or the first quarter of the 14th century. The defensive perimeter of the castle was 6.5 hectares; it is the largest enclosure type castle in Lithuania. The castle was built on plain ground and was designed for flank defense. The rectangular castle's yard covered approximately 1.8 hectares and was protected by walls 15 meters high and 2 meters thick. The castle had 4 gates and towers. The main tower (donjon), about 30 meters high, was used for residential quarters. Medininkai was first mentioned in 1392. The castle was badly damaged by a major fire in the late 15th century. Because of increased use of firearms, this type of castle was no longer suited for defensive purposes and was later used as a residence. During the 17th – 18th centuries it was reorganized into a farm and a bakery.