Castillo de San Marcos stands on a commanding hill east of Sanlúcar de Guadiana in Huelva province, offering excellent views of the Guadiana River and the Portuguese settlement of Alcoutim across the border. Originally built in the early 14th century to control traffic on the strategic river frontier, this fortification underwent three major phases of development. The visible structure today results from modifications during the Spanish-Portuguese War (1640-1668) and War of Succession (1703-1713), when bastions and parapets were added to create a modern defensive system. The castle was carefully restored in 2014 following a restoration plan approved in 2011 by Spain's Ministry of Culture and the Junta de Andalucía. The fortress remains the most important fortification of the Huelva border region.