Promoted captain, he took part in the War of the Pyrenees against France, which ended with the April 1795 Peace of Basel. He was posted to the Canary Islands in 1799, where he fought a duel with the local Capitán-General. Despite being transferred to El Hierro, he continued their feud; he was court-martialed as a result and sentenced to one year in the Royal Prison at the Concepción Arsenal at Cádiz.