Although removed from active service, when in 1807 he planned to resist the French invasion, Brigadier Bacelar offered to obey the orders of Lieutenant General Sepúlveda, accepting the command of a planned line of defense of the northern provinces that the government had ordered.