Square: Gibraltar was an unhealthy place to live due to its poor sanitation and living conditions. It was repeatedly ravaged by epidemics of yellow fever and cholera, which killed thousands of the inhabitants and members of the garrison. An epidemic in the second half of 1804 killed more than a third of the entire population, civilian and military. Lord Nelson wrote the following March that he hoped that Gibraltar "will escape the dreadful scourge of last autumn, and I hope that General Fox has burnt down all the small houses at the back of the Town; and perhaps if half the Town went with them, it would be better for the Rock." During the wars against Napoleonic France, Gibraltar served first as a Royal Navy base from which blockades of the ports of Cádiz, Cartagena and Toulon were mounted, then as a gateway for British forces and supplies in the Peninsular War between 1807 and 1814. In July 1801 a French and Spanish naval force fought the two Battles of Algeciras off Gibraltar, which ended in disaster for the Spanish when two of their largest warships each mistook the other for the enemy, engaged each other, collided, caught fire and exploded, killing nearly 2,000 Spanish sailors. Two years later Gibraltar served as a base for Lord Nelson in his efforts to bring the French Admiral Pierre-Charles Villeneuve to battle, which culminated in the Battle of Trafalgar in which Nelson was killed and Villeneuve captured. Nelson sailed to Gibraltar in June 1803 to launch the Trafalgar Campaign and oversee the blockades against France and Spain, though he spent little time ashore. On 28 October 1805, a week after the Battle of Trafalgar, the badly damaged HMS Victory returned to Gibraltar with Nelson's body aboard; Admiral Collingwood's dispatch to General Fox, announcing the victory and Nelson's death, was printed in the pages of the Gibraltar Chronicle. It thus became the first newspaper in the world to report the victory at Trafalgar, two weeks ahead of The Times. In the years after Trafalgar, Gibraltar became a major supply base for supporting the Spanish uprising against Napoleon. The French invasion of Spain in 1808 prompted Gibraltar's British garrison to cross the border and destroy the ring of Spanish fortresses around the bay, as well as the old Spanish fortified lines on the isthmus, to deny the French the ability to besiege Gibraltar or control