Johnstone was then given command of a squadron that was assigned to carry out an expedition to the River Plate, but in 1780 the Dutch entered the war against Britain and allied with France. Immediately Dutch possessions around the world became valuable targets for the British, and taking advantage of Johnstone's expedition, it was quickly reinforced with more warships, transports and East Indiamen, and assigned to carry out a secret expedition to capture the Dutch colony at the Cape of Good Hope. Johnstone sailed on his expedition from Spithead on 13 March 1781 in command of 46 ships, including five ships of the line (the 74-gun , the 64-gun , and the 50-gun , and ), four frigates (the 38-gun HMS "Apollo", the 36-gun , and the 28-gun ), the fireship and the bomb vessel . He also had seven light armed cruisers, two cutters and a sloop to serve as despatch vessels, four transports, eight storeships, and thirteen Indiamen. Also with the expedition were 3,000 troops under General Sir William Medows. The expedition at first went well, with the cutter capturing a Dutch merchant ship on the fourth day out of port. However the French had learned of the expedition's intent through the services of the spy François Henri de la Motte, based in London, and quickly prepared an expedition under Admiral Pierre André de Suffren to foil Johnstone by beating him to the Cape and reinforcing it.