The Surprises wait at Malta as their ship is slowly repaired, after their successful mission on the Ionian coast. Aubrey and Maturin meet Mrs Laura Fielding at music parties she holds. Besides her musical talents, she teaches Italian, waiting on news of her husband, a naval lieutenant who is a prisoner-of-war in France. French intelligence agents use Fielding's plight to manipulate Mrs Fielding into spying for them. Aubrey saves her huge dog Ponto from a fall in the well.
This endears Ponto to Aubrey, leading the gossips of Malta to assume he is carrying on an affair with Mrs Fielding. She asks Maturin to pay her attentions, to satisfy the French agents. He lets it appear to the French spies watching her place as if they are conducting an affair, and prepares false materials for her to pass on. Professor Graham is returned to England rapidly when the new Commander of the Mediterranean fleet, Admiral Sir Francis Ives and acting second secretary Andrew Wray, arrive in Malta with their own advisor on Turkish affairs.
Once Aubrey gets news that an earlier prize was accepted by the board, he spends money to speed up repairs on Surprise . French spies are active in Malta. Before he leaves, Graham describes Lesueur, a French agent known to him. Unbeknownst to Maturin, Wray meets with Lesueur, receives payments from him and learns what Maturin has done to French spies. Maturin is delighted to receive his diving bell, built on Edmond Halley's design. He and Heneage Dundas test it out from Dundas’s ship. It travels with Maturin on the next mission.
Aubrey is dispatched on a secret mission by the active Admiral Ives, to capture a Turkish galley laden with French silver in the Red Sea. They sail on the Dromedary to Tina, and then walk across the Sinai Peninsula to meet the HEI ship Niobe at Suez. Aubrey takes command of Niobe and sails her down the Red Sea with Turkish troops to intercept the galley. They spot it and give chase. Aubrey notices that the galley is using a drag sail to artificially slow its speed. Realizing the trickery, Aubrey sinks the galley to deny the French its silver. Maturin and Aubrey use the diving bell to retrieve the cargo, learning it is lead not silver, a complete trap. From a fishing boat Aubrey learns that the galley had been in the sea for a month awaiting them. It was to lure them under French cannons on land. They return on Niobe to Suez and offload the disappointed and dismayed Turkish troops. The Surprises retrace their steps across the desert. Bedouin horsemen steal their camel train, so they reach Tina exhausted. Only Aubrey’s chest, with his chelengk award and the dragoman’s papers, is saved by Killick’s diligent effort. They return to Malta on Dromedary .
Aubrey learns that Surprise is to return to England to be sold or scrapped, very sad news. Maturin is in a mood to gamble at cards. Wray loses their piquet games, betting more than the cash he has on hand, and thus owes Maturin, who asks for naval favors in return, like a ship for recently-promoted Pullings. Before despatching Surprise to England, Ives asks Aubrey to take the Adriatic convoy up to Trieste. There he meets Captain Cotton of HMS Nymphe , who has just rescued the escaped prisoner-of-war, Lieutenant Charles Fielding. Maturin removes a bullet from Fielding, who is a brave man, but also a very jealous one. He hears the rumour of Aubrey's liaison with his wife and refuses to return to Malta on Surprise, challenging Aubrey to a duel when they next meet on land.
On this return journey Captain Dundas, commanding HMS Edinburgh , tells Aubrey of a French privateer, which Aubrey then captures with Dryad in convoy. The chase delays Surprise into port, two days behind Babbington's sloop Dryad , so the news of Lieutenant Fielding's rescue has begun to circulate. Maturin speeds to Mrs Fielding's house, but she is not home. Lesueur and Boulay, a double agent on the Governor's staff, arrive to kill her, as she is of no more use to them, and have already killed Ponto. Instead, Maturin quietly listens to their conversation until they leave. When she arrives, he takes her aboard the Surprise , saving her life.
Admiral Ives orders Aubrey to sail for Zambra on the Barbary Coast to persuade the Dey of Mascara not to molest British ships, in convoy with HMS Pollux , which is returning Admiral Harte to England. While Pollux waits at the entrance of the Bay of Zambra, the French Mars with two frigates fire on her, with a fierce ensuing battle. Pollux blows up, killing all 500 aboard, but she severely damages Mars . The two frigates chase Surprise deep into the bay until the heavier frigate runs aground on a reef. Her smaller consort deserts the fight. Aubrey wants to continue; on the political advice of Maturin, he sets sail for Gibraltar. This ambush on a voyage known to so few makes it clear that someone highly placed in the British command betrayed them to the French. Maturin hopes Wray will find the traitor out.