sentences:  Gaínza had to wait under guard for the conclusion of the court martial in Lima.In 1816 he was acquitted, but his reputation in the army was seriously damaged.Therefore, he moved to Quito, under the jurisdiction of the viceroy of New Granada.