Having transferred to the Jamaica Station she then participated in an attack on Leogane, Haiti, on 21 March 1796 where, after Africa and the ship of the line HMS Leviathan had been heavily damaged by shore batteries, the landings were called off. In October of the same year Africa was again paid off, spending almost two years out of service before she was recommissioned as a hospital ship under Lieutenant John Bryant in September 1798. Command of the ship changed to Lieutenant John Dixon in early 1800 but little else of note occurred in her service as a hospital ship. Napoleonic Wars The Napoleonic Wars having begun, Africa was reconfigured as a 64-gun ship of the line again by Thomas Pitcher at Northfleet between September 1804 and July 1805. She was recommissioned by Captain Henry Digby at the end of her conversion. Africa was present at the Battle of Trafalgar on 21 October 1805; having been separated from the main British fleet before the battle, she arrived from a different direction without knowing the battle plan that Admiral Horatio Nelson had devised. As the rest of the fleet engaged the combined Franco-Spanish fleet in a pell-mell battle, Digby sailed Africa down the line of enemy ships in a parallel fashion, exchanging broadsides. She lost eighteen men killed and a further forty-four wounded in the battle. Gunboat War During the Gunboat War, Africa was under the command of Captain John Barrett. On 15 October 1808, Africa was escorting a convoy of 137 merchant ships in the Baltic, with the assistance of the bomb vessel HMS Thunder and two gun-brigs. They left Karlskrona that day and on 20 October they anchored in the Øresund off Malmö. At noon a flotilla of Danish gunboats was seen moving towards the convoy and Africa sailed to intercept them. The flotilla consisted of 25 gunboats and seven armed launches, mounting some 70 heavy cannons and with an overall total of some 1600 men. It was under the command of Commodore Johan Cornelius Krieger. At 1:30 the wind died and Africa was immobilized. By 2:50pm the gunboats had stationed themselves off Africas quarters, where few of her guns could fire, and opened fire. The battle continued until 6:45pm when with night closing in all firing ceased. Had daylight lasted another hour the Danes might have captured Africa, however nightfall meant both forces left the battlefield without victory