Complex sentence: He presented his diplomatic credentials to Juan Carlos I in Barcelona but his tenureship remained until 13 April 1977 when he resigned in protest against the allegations of riggings during the general elections held in 1977.
Split into simpler sentences: He presented his diplomatic credentials to Juan Carlos I in Barcelona. On 13 April 1977, he resigned his post in protest against allegations of riggings during the general elections held in 1977.