Complex sentence: In 1662 Afonso put away his mother and assumed control of the state, in January 1668, shortly before Spanish recognition of Portugal's restoration of independence, Peter gained political ascendancy over his brother and was appointed regent.
Split into simpler sentences: In 1662 Afonso put away his mother and assumed control of the state. In January 1668, shortly before Spanish recognition of Portugal's restoration of independence, Peter gained political ascendancy over his brother and was appointed regent.