Charles IV of Spain abdicates in favor of his son, Ferdinand VII.