A trade authority was founded in Sevilla. This body regulated trade with America and imposed taxes on goods entering Spain. It also controlled emigration. Felipe III was not as enegetic as his father. He left political decisions to a royal favourite, or valido, who governed on his behalf. Felipe III's favourite was the Duke of Lerma, who was more concerned with his own personal interests than ruling the country. The Spanish economy was badly affected by financial problems. The Dufe of Lerma mos disastrous decision was the expulsion of moriscos in 1609. The moriscos were a hard-working minority, and the economy was damaged by their departure. In foreign affairs, there was a pause in the continuous wars of the previous century, Peace was signed with England in 1604. The Twelve years Truce was signed with the Dutch rebels of the United Provinces. Felipe IV's valido, the Count-Duke of Olivares, tried to maintain Spain's position as the leading power in Europe. Olivares aimed to reformed the Spanish state. He devised a project called the Union of Arms that required all the different territories to make significant military contributions depending on their size. There was resistance to Olivares' measures. Cataluña broke out in a revolt, requesting support from France. The Duke of Braganza declared himself King of Portugal. In the Thirty Years' War, the Spanish defeat in the Battle of Rocroi was the end of Spain's retation as the leading military power in Europe. By the Treaty of Westphalia, which ended the war, Spain recognised the independence of the United Provinces. But war continued with the French until 1659. Carlos II was only two years old when he succseded Felipe IV and his mother ruled as regent. Before Carlos II died in 1700 he named Philip of Anjou, a member of the French Bourbon dynasty, as his heir. Philip became Felipe V of Spain but he was only confirmed as monarch after the War of Spanish succession in which the Low Countries, England and Austria all supported a rival candidate. Carlos II's death marked the end of the Spanish Habsburg dynasty.