 He resigned from this position when he was elected mayor of Caracas in October 2004.During his term in office, Barreto's relationships with the other mayors of Caracas were hostile.On August 22, 2006 he denounced fellow mayors Leopoldo López and Henrique Capriles.