He organized in that port the militia and naval reserve, and also established arsenals for its defence.
In 1811, he was a substitute Deputy (representing Concepcion) to the first National Congress, that met between July 4 and December 2 of that year.
On March 14, 1814, he was chosen Supreme Director of Chile and promoted to full colonel.
He was liberated after the victory of Chacabuco, re-entered the service, and, after attaining the rank of colonel, was for the second time appointed (in 1817) governor and general commander of the navy at Valparaiso.
As such, he became temporary Supreme Director, from December 30, 1823 until January 3, 1824, while the proprietary, General Ramon Freire, was away.