Basset y Ramos was tried and imprisoned by king Charles, whom he served, in consequence of promising Valencian farmers exemption from fees and taxes. Following the defeat in the Battle of Almansa, on April 25, 1707, he was released to organize the few remaining forces loyal to the austracistas, an impossible task, and to gather troops to defend Barcelona, which delayed the fall of the city until September 11, 1714.