During the French Revolution, Napoleon Bonaparte of France decided in 1793 that he wanted to invade Britain after having already conquered massive areas of Europe.
He made several attempts to attack via Ireland and Wales, but soon realised that only a full-scale invasion would work.
Britain therefore built their army up and introduced a new tax in 1799 to fund the war effort.
As a result of this, the Royal Navy was refurbished and Admiral Horatio Nelson chosen as its leader.
On 21st October 1805, the Battle of Trafalgar was fought between the navies of France and Spain on one side, and Great Britain on the other.
It took place out at sea, near Cape Trafalgar in south-west Spain.
Nelson put his ships into two lines and they managed to cause great damage to the French and Spanish line:
On board his ship HMS Victory, Nelson was hit by a bullet fired from the French ship Redoutable and died later in the day after hearing that the battle had been won.
It has been estimated that the British lost nearly 2,000 men, killed or wounded, while the French lost nearly 7,000.
This secured the Royal Navy as the rulers of the waves for decades and the the saved Britain from invasion by the French Grand Army.
Nelson's body was brought back to Great Britain and he was given a hero's funeral. In 1843, the famous Trafalgar Square and Nelson's Column were built in London to honour him.