candidate, Baquedano's resignation left Santa María as the consensus candidate. He was elected president in 1881. During his administration, he continued the War of the Pacific to its end. A few months prior to his presidency Chile had captured Lima and Santa María's administration forced Peru to sign the Treaty of Ancón (October 29, 1883), putting an end to war. Santa María also wrote the peace treaty with Bolivia in 1884, basis for the future peace Treaty of 1904. In the domestic front, his main fight was against the power of the Catholic Church in Chile. He forced through congress the laws of civil marriage, civil registry and public cemeteries, all of which were functions formerly in the hands of the Church. His actions led to a break in diplomatic relations with Rome. He also concluded the Occupation of the Araucanía, incorporating the area into the territory of Chile. He centralized the railroads into a state holding, inaugurated the first telephonic line between Santiago and Concepcion, and introduced the first public electric lighting. Santa María's presidency was also marked by increased electoral fraud and intervention in favor of the government liberals. In the parliamentary election of 1881, the conservatives refused to participate, except for Carlos Walker Martínez who was a candidate for deputy. The government went out of its way to prevent Walker's election and in a district with 20,000 voters there were 34,000 votes. The opposition did manage to elect a few anti-government liberals and radicals. In 1885, the electoral fight was much more violent and the conservatives were determined to oppose fraud. Fights between government supporters and detractors left many dead or wounded and there were numerous reports of votes being stolen by government officials. Santa María, far from denying he participated in fraud, openly admitted it. "I have been called authoritarian. [...] Giving away the votes to unworthy people, to the irrational passions of the parties, and even with universal suffrage, is suicide for a ruler, and I will not commit suicide before a chimera. I can see this well and I will impose myself to govern as well as I can and I will support as many liberal laws as are presented to prepare the ground for a future democracy. Hear me well: future democracy," he once said. On another occasion, he simply admitted, "I have been called an interventor [of elections]. I am. I belong