Question: By what year did the Allies force the country that promised aid to Mysore to fight the British out of the Iberian peninsula?

full_context: Document 1: Napoleon: Tensions over rising Polish nationalism and the economic effects of the Continental System led to renewed confrontation with Russia. To enforce his blockade, Napoleon launched an invasion of Russia in the summer of 1812. The resulting campaign witnessed the catastrophic collapse of the Grand Army, forcing the French to retreat, as well as leading to the widespread destruction of Russian lands and cities. In 1813, Prussia and Austria joined Russian forces in a Sixth Coalition against France. A chaotic military campaign in Central Europe eventually culminated in a large Allied army defeating Napoleon at the Battle of Leipzig in October. The next year, the Allies invaded France and captured Paris, forcing Napoleon to abdicate in April 1814. He was exiled to the island of Elba. The Bourbons were restored to power and the French lost most of the territories that they had conquered since the Revolution. However, Napoleon escaped from Elba in February 1815 and took control of the government once again. The Allies responded by forming a Seventh Coalition, which ultimately defeated Napoleon at the Battle of Waterloo in June. The Royal Navy then thwarted his planned escape to the United States in July, so he surrendered to the British after running out of other options. The British exiled him to the remote island of Saint Helena in the South Atlantic. His death in 1821 at the age of 51 was received with shock and grief throughout Europe. In 1840, a million people witnessed his remains returning to Paris, where they still reside at Les Invalides.
Document 2: History of India: For two and a half centuries from the mid 13th, the politics in the Northern India was dominated by the Delhi Sultanate and in the Southern India by the Vijayanagar Empire which originated as a political heir of the erstwhile Hoysala Empire and Pandyan Empire. However, there were other regional powers present as well. In the North, the Rajputs were a dominant force in the Western and Central India. Their power reached to the zenith under Rana Sanga during whose time Rajput armies were constantly victorious against the Sultanate army. In the South, the Bahmani Sultanate was the chief rival of the Vijaynagara and gave Vijayanagara tough days many a times. In the early 16th century Krishnadevaraya of the Vijayanagara Empire defeated the last remnant of Bahmani Sultanate power after which the Bahmani Sultanate collapsed. It was established either by a Brahman convert or patronized by a Brahman and form that source it got the name Bahmani. In the early 16th century, it collapsed and got split into five small Deccan sultanates. In the East, the Gajapati Kingdom remained a strong regional power to reckon with, so was the Ahom Kingdom in the North-east for six centuries.
Document 3: Napoleon: Before going to Iberia, Napoleon decided to address several lingering issues with the Russians. At the Congress of Erfurt in October 1808, Napoleon hoped to keep Russia on his side during the upcoming struggle in Spain and during any potential conflict against Austria. The two sides reached an agreement, the Erfurt Convention, that called upon Britain to cease its war against France, that recognized the Russian conquest of Finland from Sweden, and that affirmed Russian support for France in a possible war against Austria "to the best of its ability." Napoleon then returned to France and prepared for war. The Grande Armée, under the Emperor's personal command, rapidly crossed the Ebro River in November 1808 and inflicted a series of crushing defeats against the Spanish forces. After clearing the last Spanish force guarding the capital at Somosierra, Napoleon entered Madrid on 4 December with 80,000 troops. He then unleashed his soldiers against Moore and the British forces. The British were swiftly driven to the coast, and they withdrew from Spain entirely after a last stand at the Battle of Corunna in January 1809.
Document 4: Napoleon: Unhappy with this change of policy by the Portuguese government, Napoleon sent an army to invade Portugal. On 17 October 1807, 24,000 French troops under General Junot crossed the Pyrenees with Spanish cooperation and headed towards Portugal to enforce Napoleon's orders. This attack was the first step in what would eventually become the Peninsular War, a six-year struggle that significantly sapped French strength. Throughout the winter of 1808, French agents became increasingly involved in Spanish internal affairs, attempting to incite discord between members of the Spanish royal family. On 16 February 1808, secret French machinations finally materialized when Napoleon announced that he would intervene to mediate between the rival political factions in the country. Marshal Murat led 120,000 troops into Spain and the French arrived in Madrid on 24 March, where wild riots against the occupation erupted just a few weeks later. Napoleon appointed his brother, Joseph Bonaparte, as the new King of Spain in the summer of 1808. The appointment enraged a heavily religious and conservative Spanish population. Resistance to French aggression soon spread throughout the country. The shocking French defeat at the Battle of Bailén in July gave hope to Napoleon's enemies and partly persuaded the French emperor to intervene in person.
Document 5: British Empire: During the middle decades of the 18th century, there were several outbreaks of military conflict on the Indian subcontinent, the Carnatic Wars, as the English East India Company (the Company) and its French counterpart, the Compagnie française des Indes orientales, struggled alongside local rulers to fill the vacuum that had been left by the decline of the Mughal Empire. The Battle of Plassey in 1757, in which the British, led by Robert Clive, defeated the Nawab of Bengal and his French allies, left the Company in control of Bengal and as the major military and political power in India. France was left control of its enclaves but with military restrictions and an obligation to support British client states, ending French hopes of controlling India. In the following decades the Company gradually increased the size of the territories under its control, either ruling directly or via local rulers under the threat of force from the British Indian Army, the vast majority of which was composed of Indian sepoys.
Document 6: Maratha Empire: Ultimately, the Third Anglo - Maratha War (1817 -- 1818) resulted in the loss of Maratha independence. It left the British in control of most of India. The Peshwa was exiled to Bithoor (Marat, near Kanpur, Uttar Pradesh) as a pensioner of the British. The Maratha heartland of Desh, including Pune, came under direct British rule, with the exception of the states of Kolhapur and Satara, which retained local Maratha rulers (descendants of Shivaji and Sambhaji II ruled over Kolhapur). The Maratha - ruled states of Gwalior, Indore, and Nagpur all lost territory and came under subordinate alliance with the British Raj as princely states that retained internal sovereignty under British paramountcy. Other small princely states of Maratha knights were retained under the British Raj as well.
Document 7: Spanish Empire: Napoleon Bonaparte's invasion of Iberia, forcing the abdication of Charles IV and replacing him with Bonaparte's brother Joseph, produced unforeseen changes in Spain and its overseas empire. The outbreak of the Spanish American wars of independence was a result of Napoleon's destabilizing actions in Spain and led to the fragmentation of the former viceroyalties into independent nation - states. Royal government disappeared and local strongmen emerged in the Spanish American republics in the wake of these wars.
Document 8: Fourth Anglo-Mysore War: This was the final conflict of the four Anglo -- Mysore Wars. The British captured the capital of Mysore. The ruler Tipu Sultan was killed in the battle. Britain took indirect control of Mysore, restoring the Wodeyar Dynasty to the Mysore throne (with a British commissioner to advise him on all issues). Tipu Sultan's young heir, Fateh Ali, was sent into exile. The Kingdom of Mysore became a princely state in a subsidiary alliance with British India and ceded Coimbatore, Dakshina Kannada and Uttara Kannada to the British.
Document 9: Napoleon: The Russians avoided Napoleon's objective of a decisive engagement and instead retreated deeper into Russia. A brief attempt at resistance was made at Smolensk in August; the Russians were defeated in a series of battles, and Napoleon resumed his advance. The Russians again avoided battle, although in a few cases this was only achieved because Napoleon uncharacteristically hesitated to attack when the opportunity arose. Owing to the Russian army's scorched earth tactics, the French found it increasingly difficult to forage food for themselves and their horses.
Document 10: Napoleon: Hoping to extend the Continental System, Napoleon invaded Iberia and declared his brother Joseph the King of Spain in 1808. The Spanish and the Portuguese revolted with British support. The Peninsular War lasted six years, noted for its brutal guerrilla warfare, and culminated in an Allied victory. Fighting also erupted in Central Europe, as the Austrians launched another attack against the French in 1809. Napoleon defeated them at the Battle of Wagram, dissolving the Fifth Coalition formed against France. By 1811, Napoleon ruled over 70 million people across an empire that had domination in Europe, which had not witnessed this level of political consolidation since the days of the Roman Empire. He maintained his strategic status through a series of alliances and family appointments. He created a new aristocracy in France while allowing the return of nobles who had been forced into exile by the Revolution.
Document 11: History of India: By the early 18th century, the Maratha Kingdom had transformed itself into the Maratha Empire under the rule of the Peshwas (prime ministers). In 1737, the Marathas defeated a Mughal army in their capital, Delhi itself in Battle of Delhi (1737). The Marathas continued their military campaigns against Mughals, Nizam, Nawab of Bengal and Durrani Empire to further extend their boundaries. Gordon explained how the Maratha systematically took control over new regions. They would start with annual raids, followed by collecting ransom from villages and towns while the declining Mughal Empire retained nominal control and finally taking over the region. He explained it with the example of Malwa region. Marathas built an efficient system of public administration known for its attention to detail. It succeeded in raising revenue in districts that recovered from years of raids, up to levels previously enjoyed by the Mughals. For example, the cornerstone of the Maratha rule in Malwa rested on the 60 or so local tax collectors who advanced the Maratha ruler Peshwa a portion of their district revenues at interest. By 1760, the domain of the Marathas stretched across practically the entire subcontinent. The north-western expansion of the Marathas was stopped after the Third Battle of Panipat (1761). However, the Maratha authority in the north was re-established within a decade under Peshwa Madhavrao I. The defeat of Marathas by British in third Anglo-Maratha Wars brought end to the empire by 1820. The last peshwa, Baji Rao II, was defeated by the British in the Third Anglo-Maratha War. With the defeat of the Marathas, no native power represented any significant threat for the British afterwards.
Document 12: Modern history: On the Indian subcontinent, the Mughal Empire ruled most of India in the early 18th century. The "classic period" ended with the death and defeat of Emperor Aurangzeb in 1707 by the rising Hindu Maratha Empire, although the dynasty continued for another 150 years. During this period, the Empire was marked by a highly centralized administration connecting the different regions. All the significant monuments of the Mughals, their most visible legacy, date to this period which was characterised by the expansion of Persian cultural influence in the Indian subcontinent, with brilliant literary, artistic, and architectural results. The Maratha Empire was located in the south west of present-day India and expanded greatly under the rule of the Peshwas, the prime ministers of the Maratha empire. In 1761, the Maratha army lost the Third Battle of Panipat which halted imperial expansion and the empire was then divided into a confederacy of Maratha states.
Document 13: Napoleon: Napoleon would end up leaving Iberia in order to deal with the Austrians in Central Europe, but the Peninsular War continued on long after his absence. He never returned to Spain after the 1808 campaign. Several months after Corunna, the British sent another army to the peninsula under the future Duke of Wellington. The war then settled into a complex and asymmetric strategic deadlock where all sides struggled to gain the upper hand. The highlight of the conflict became the brutal guerrilla warfare that engulfed much of the Spanish countryside. Both sides committed the worst atrocities of the Napoleonic Wars during this phase of the conflict. The vicious guerrilla fighting in Spain, largely absent from the French campaigns in Central Europe, severely disrupted the French lines of supply and communication. Although France maintained roughly 300,000 troops in Iberia during the Peninsular War, the vast majority were tied down to garrison duty and to intelligence operations. The French were never able to concentrate all of their forces effectively, prolonging the war until events elsewhere in Europe finally turned the tide in favor of the Allies. After the invasion of Russia in 1812, the number of French troops in Spain vastly declined as Napoleon needed reinforcements to conserve his strategic position in Europe. By 1814, after scores of battles and sieges throughout Iberia, the Allies had managed to push the French out of the peninsula.
Document 14: Napoleon: Napoleon knew that the French fleet could not defeat the Royal Navy in a head-to-head battle, so he planned to lure it away from the English Channel through diversionary tactics. The main strategic idea involved the French Navy escaping from the British blockades of Toulon and Brest and threatening to attack the West Indies. In the face of this attack, it was hoped, the British would weaken their defense of the Western Approaches by sending ships to the Caribbean, allowing a combined Franco-Spanish fleet to take control of the channel long enough for French armies to cross and invade. However, the plan unraveled after the British victory at the Battle of Cape Finisterre in July 1805. French Admiral Villeneuve then retreated to Cádiz instead of linking up with French naval forces at Brest for an attack on the English Channel.
Document 15: History of India: There were several other kingdoms which ruled over parts of India in the later medieval period prior to the British occupation. However, most of them were bound to pay regular tribute to the Marathas. The rule of Wodeyar dynasty which established the Kingdom of Mysore in southern India in around 1400 CE by was interrupted by Hyder Ali and his son Tipu Sultan in the later half of the 18th century. Under their rule, Mysore fought a series of wars sometimes against the combined forces of the British and Marathas, but mostly against the British, with Mysore receiving some aid or promise of aid from the French.
ground_truth: 1814
sub_queries: What country promised aid to Mysore to fight the British? Answer: the French
By what year did the Allies force the the French out of the Iberian peninsula? Answer: 1814