The largest castles in Wales were built primarily during the 13th and 14th centuries, with some constructions extending into the 15th century.