Answer
San Martín was appointed Protector of Peru on July 12, 1821, marking a significant milestone in Peru's quest for independence from Spanish rule. In this role, he assumed executive authority and played a pivotal role in consolidating Peru's sovereignty and establishing its republican government.