In 1774 Liniers requested dismissal and re-enlisted as a volunteer in the campaigns against the Moors in Algiers. He benefited from the third Pacte de Famille (1761), which allowed Frenchmen to take part in Spanish military campaigns with equal rights and requirements as the Spaniards. At the campaign's conclusion, Liniers took an exam as a Midshipman in Cádiz, to serve as a volunteer for the Spanish Crown. In 1775 he earned the rank of Ensign in the Spanish Navy.