In 1804, Napoleon appointed Jourdan as a Marshal of the Empire. He remained in the newly created Kingdom of Italy until 1806, when Joseph Bonaparte, whom his brother made King of Naples that year, selected Jourdan as his military adviser. He followed Joseph into Spain in 1808; but Joseph's throne had to be maintained by the French Army, and throughout the Peninsular War, the other marshals, who depended directly upon Napoleon, paid little heed either to Joseph or to Jourdan. Jourdan was blamed for the defeat at the Battle of Talavera in 1809 and replaced by Marshal Jean-de-Dieu Soult. He was reinstated as Joseph's chief of staff in September 1811 but given few troops. After the disastrous French defeat at the Battle of Salamanca in July 1812, Joseph and Jourdan were forced to abandon Madrid and retreat to Valencia. Joining with Soult's army, which evacuated Andalusia, the French were able to recapture Madrid during the Siege of Burgos and push Wellington's Anglo-Portuguese army back to Portugal.