Answer
The Viceroyalty of Peru, headquartered in Lima, was the formidable power that posed a constant threat to the United Provinces of the Río de la Plata, led by José de San Martín. This viceroyalty, representing Spanish imperial rule in South America, held significant military, economic, and political influence over the region.