Answer
Alfonso XII returned to Spain in 1874 following a military coup against the First Spanish Republic. The Republic was established in 1873 after the overthrow of the monarchy, but it was a troubled period that saw a number of uprisings and political instability. In 1874, a group of military officers led by General Arsenio Martínez Campos staged a coup and proclaimed Alfonso XII as king.