On the way back to Lisbon, Nelson had a scout about for the enemy fleet. He had a peek into Toulon, where they were last seen, but they weren't there. He continued along the coast to the Spanish port of Cartagena, but they weren't there either. He came to the conclusion that they must be heading for the Straits of Gibraltar.
Meanwhile, in October the Spanish fleet under commander Langara, had joined the French fleet, under Rear-Admiral Pierre Villeneuve (who would appear more than once in the Nelson story!), at Toulon. The combined fleets were then ordered to leave the Mediterranean and head north to help with the French invasion of Ireland.
So in December they made a move. Villeneuve was successful in dodging the British fleets, and got out of the Mediterranean and reached Brest, on the north-west coast of France - but, as it turned out, too late to help with the invasion, which failed.
But Langara knew that the Spanish ships were in a poor state for a battle so stopped off at Cartagena on 6th December for supplies and repairs. This action led to him being replaced by an impatient Spanish government, but his successor, Admiral José de Mazarredo, also refused to leave until the problems with ships, supplies and under-manning were solved. He, too, was therefore replaced, by Admiral José de Córdova y Ramos. The problem was that Spain didn't dedicate anywhere near enough resources to their navy in order to fight a successful war at sea. Technically, their ships were some of the largest and finest in the world, but they were under-supplied and their crews were not skilled or trained particularly well. For example, the Santisima Trinidad was a beast of a ship - with four decks and 130 guns, she was the largest ship in the world at that time. But only 60 out of her 900 crew had the experience and skill needed to successfully man a ship of war.
In 1793, while captain of the Agamemnon, Nelson had visited Cadiz and had a look round the dockyard. He wrote to his wife, Frances, concluding that "I am certain if our six barges' crews (which are picked men) had got on board one of their first rates they would have taken her. Therefore in vain may the Dons make fine ships, they cannot however make men."
This conclusion probably contributed to giving him the confidence that led to his remarkable actions in the forthcoming battle.
Having reached Gibraltar on the 1st December, Jervis' fleet was then caught in a violent storm. Two of his ships - the Courageux and Zealous - were wrecked. Another two - the Culloden and Gibraltar - ran aground. The Culloden was refloated but the Gibraltar was so badly damaged that she had to go back to England for extensive repairs. HMS Bombay Castle and the St George got stuck on a sandbank, and the latter had to go to Lisbon to repair. The British fleet had now been reduced to 10 ships.
As his ships were battered by the storm, Jervis watched the French fleet escape through the Straits and out into the Atlantic. He assumed that the Spanish were following and worried that they would intercept Nelson and his convoy, so headed to Cape St Vincent to wait for him.
On the 6th February 1797, Jervis was relieved to be reinforced by Rear-Admiral William Parker with his squadron of five ships, who also brought the news that the Irish invasion had failed and the French fleet were in Brest. This gave Jervis a little breathing space and he could now focus on the Spanish knowing that the French were out of the way.
All he had to do now was find them.
On the 1st of February, Córdova was ordered to take his 27 ships-of-the-line and 8 frigates to assist at the siege of Gibraltar. Crucially, he was also ordered to pick up a convoy from Malaga and take it to Cadiz. The convoy was made up of 5 'urcas', armed storeships carrying a valuable cargo of mercury.
On the 5th of February, Córdova detached 3 ships of the line, with launches, into Algeciras, and on the 6th the rest of the fleet reached Cadiz. But before the mercury ships could get into the port, a gale blew up which forced the whole fleet to stay out at sea for 8 days. This was Jervis' opportunity to find them.
On the 9th of February, he received a report from the frigate Viper that the Spanish had gone through the Straits on the 5th and gone into Cadiz on the 6th. But on the 10th, the Emerald reported that they were in fact still at sea.