he then went to lima where he was the mayor of the city during a short period