Question: When did the Allies force the fighters the first battle appeared to favor out of the Iberian peninsula?

full_context: Document 1: Crimean War: The Allied army relocated without problems to the south and the heavy artillery was brought ashore with batteries and connecting trenches built so that by 10 October some batteries were ready and by 17 October—when the bombardment commenced—126 guns were firing, 53 of them French.:430 The fleet at the same time engaged the shore batteries. The British bombardment worked better than the French, who had smaller caliber guns. The fleet suffered high casualties during the day. The British wanted to attack that afternoon, but the French wanted to defer the attack. A postponement was agreed, but on the next day the French were still not ready. By 19 October the Russians had transferred some heavy guns to the southern defenses and outgunned the allies.:431
Document 2: Franco-Prussian War: On 10 October, hostilities began between German and French republican forces near Orléans. At first, the Germans were victorious but the French drew reinforcements and defeated the Germans at the Battle of Coulmiers on 9 November. After the surrender of Metz, more than 100,000 well-trained and experienced German troops joined the German 'Southern Army'. The French were forced to abandon Orléans on 4 December, and were finally defeated at the Battle of Le Mans (10–12 January). A second French army which operated north of Paris was turned back at the Battle of Amiens (27 November), the Battle of Bapaume (3 January 1871) and the Battle of St. Quentin (13 January).
Document 3: Franco-Prussian War: The first action of the Franco-Prussian War took place on 4 August 1870. This battle saw the unsupported division of General Douay of I Corps, with some attached cavalry, which was posted to watch the border, attacked in overwhelming but uncoordinated fashion by the German 3rd Army. During the day, elements of a Bavarian and two Prussian corps became engaged and were aided by Prussian artillery, which blasted holes in the defenses of the town. Douay held a very strong position initially, thanks to the accurate long-range fire of the Chassepots but his force was too thinly stretched to hold it. Douay was killed in the late morning when a caisson of the divisional mitrailleuse battery exploded near him; the encirclement of the town by the Prussians threatened the French avenue of retreat.
Document 4: Franco-Prussian War: At the Battle of Mars-la-Tours, the Prussian 12th Cavalry Brigade, commanded by General Adalbert von Bredow, conducted a charge against a French artillery battery. The attack was a costly success and came to be known as "von Bredow's Death Ride", which was held to prove that cavalry charges could still prevail on the battlefield. Use of traditional cavalry on the battlefields of 1914 proved to be disastrous, due to accurate, long-range rifle fire, machine-guns and artillery. Von Bredow's attack had succeeded only because of an unusually effective artillery bombardment just before the charge, along with favorable terrain that masked his approach.
Document 5: 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 6: 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 7: Franco-Prussian War: According to some historians, Bismarck adroitly created a diplomatic crisis over the succession to the Spanish throne, then edited a dispatch about a meeting between King William of Prussia and the French ambassador, to make it appear that the French had been insulted. The French press and parliament demanded a war, which the generals of Napoleon III assured him that France would win. Napoleon and his Prime Minister, Émile Ollivier, for their parts sought war to solve their problems with political disunity in France. On 16 July 1870, the French parliament voted to declare war on the German Kingdom of Prussia and hostilities began three days later. The German coalition mobilised its troops much more quickly than the French and rapidly invaded northeastern France. The German forces were superior in numbers, had better training and leadership and made more effective use of modern technology, particularly railroads and artillery.
Document 8: 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 9: 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 10: 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 11: Franco-Prussian War: On 18 August, the battle began when at 08:00 Moltke ordered the First and Second Armies to advance against the French positions. By 12:00, General Manstein opened up the battle before the village of Amanvillers with artillery from the 25th Infantry Division. But the French had spent the night and early morning digging trenches and rifle pits while placing their artillery and their mitrailleuses in concealed positions. Finally aware of the Prussian advance, the French opened up a massive return fire against the mass of advancing Germans. The battle at first appeared to favor the French with their superior Chassepot rifle. However, the Prussian artillery was superior with the all-steel Krupp breech-loading gun. By 14:30, General Steinmetz, the commander of the First Army, unilaterally launched his VIII Corps across the Mance Ravine in which the Prussian infantry were soon pinned down by murderous rifle and mitrailleuse fire from the French positions. At 15:00, the massed guns of the VII and VIII Corps opened fire to support the attack. But by 16:00, with the attack in danger of stalling, Steinmetz ordered the VII Corps forward, followed by the 1st Cavalry Division.
Document 12: Franco-Prussian War: The Battle of Spicheren, on 5 August, was the second of three critical French defeats. Moltke had originally planned to keep Bazaine's army on the Saar River until he could attack it with the 2nd Army in front and the 1st Army on its left flank, while the 3rd Army closed towards the rear. The aging General von Steinmetz made an overzealous, unplanned move, leading the 1st Army south from his position on the Moselle. He moved straight toward the town of Spicheren, cutting off Prince Frederick Charles from his forward cavalry units in the process.
Document 13: 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 14: 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 15: Western Front (World War I): The German Army came within 70 km (43 mi) of Paris but at the First Battle of the Marne (6 -- 12 September), French and British troops were able to force a German retreat by exploiting a gap which appeared between the 1st and 2nd Armies, ending the German advance into France. The German Army retreated north of the Aisne River and dug in there, establishing the beginnings of a static western front that was to last for the next three years. Following this German retirement, the opposing forces made reciprocal outflanking manoeuvres, known as the Race for the Sea and quickly extended their trench systems from the Swiss frontier to the North Sea. The territory occupied by Germany held 64 percent of French pig - iron production, 24 percent of its steel manufacturing and 40 percent of the coal industry -- dealing a serious blow to French industry.
ground_truth: 1814
sub_queries: Who did the battle first appear to favor? Answer: the French
By what year did the Allies force the the French out of the Iberian peninsula? Answer: 1814