In June 1808, Captain Horatio Hornblower is in command of the 36-gun frigate HMS Lydia, with secret orders to sail to the Pacific coast of Nicaragua (near modern Choluteca, Choluteca) and supply a prominent landowner, Don Julian Alvarado ("descendant" of Pedro de Alvarado by a fictional marriage to a daughter of Moctezuma), with muskets and powder for a planned uprising against the Spanish authorities.
Unwilling to risk fighting the much more powerful ship in a sea battle, Hornblower hides nearby until it anchors and then captures it in a surprise nighttime boarding.
After hiding the captured Spanish officers to save them from being murdered by El Supremo, Hornblower honors the request and quickly departs for England.
Off the coast of Panama he encounters a Spanish mail lugger, from which an envoy arrives to inform him of a new alliance between Spain and England against Napoleon.
Freed when Spain changed sides, and fleeing a yellow fever epidemic ashore, she requests passage back to England.
She makes the first overt advances and they embrace passionately, but Barbara's maid Hebe walking in on them brings Hornblower to the realisation that a ship's captain must not indulge in sexual dalliance with a passenger.