However, at the end of the century, after the death of the childless Charles II (1700), the Crown of Spain went to his chosen successor, Philip V of the House of Bourbon. The Grand Alliance of Austria, England and the United Provinces gave military support to a Habsburg claimant of the crown, Archduke Charles as Charles III of Spain. Catalonia initially accepted Philip V following prolonged negotiations between Philip V and the Catalan Courts between 12 October 1701 and 14 January 1702, which resulted in an agreement where the Principality of Catalonia retained all its previous privileges and gained a Court of Contraventions ("Tribunal de Contrafaccions"), the status of free port ("Port Franc") for Barcelona as well as the limited right to commerce with America, but this did not last. In 1705 the Archduke entered Barcelona, which recognized him as King in 1706; thus breaking an oath of loyalty to the Bourbon claiment, which had negative repercussions for Catalonia when Philip V eventually lost the war - he ceded Belgium and Southern Italy to the Austrians - but retained the Catalan territory.