 A government in opposition to the French was formed in Cádiz on 25 September 1808, which continued to recognize the imprisoned Ferdinand VII as king.This government was diplomatically recognized as the legitimate Spanish government by Britain and other countries at war with France.Charles IV's eldest son was restored to the throne.