The Surgeon's Mate is the seventh historical novel in the Aubrey–Maturin series written by Patrick O'Brian, first published in 1980. The story is set during the War of 1812 and the Napoleonic Wars.

Buoyed by victory over an American ship, Aubrey, Maturin and Diana Villiers speed to England on a mail packet that is chased for the papers in Maturin's hands, and possibly for Diana herself. The papers, including a copy of the official report of victory over an American ship, thus arrive in England before the originals, as the packet sailed to outrun the American chasers. Aubrey then commands HMS Ariel for a mission on the Danish coast, which ultimately leads him and Maturin once again to being prisoners of war.

This novel was part of the reissue of the series, with copies not always available in the original order written. This was a challenge to readers and reviewers of that time (1990–92), who did not fit this novel into its place in the sequence, suggesting each novel can be read on its own. It was praised as part of "O'Brian's superb series on the early-19th-century adventures" of Jack Aubrey and Stephen Maturin, and specifically marked as "Splendid escape. Literate and amusing.", providing a "look at the darker side of Maturin's life: his work in British intelligence."

Plot summary Sailing into Halifax, the victorious contends with her losses in officers and crew, with particular concern for Captain Broke, who lies unconscious from head wounds. The American Captain Lawrence dies en route from the battle and is buried at Halifax. Once in port, as prisoners of war are taken ashore and the British Navy deserters identified among them, the Shannons and her passengers, Captain Jack Aubrey, Dr Stephen Maturin, and Mrs Diana Villiers, feel the full joy of the first naval victory in the ongoing war with America. Maturin communicates with Major Beck, an army counterpart in intelligence work. At the victory ball, Aubrey is pursued by Amanda Smith, known to Diana for her predatory ways. Jack spends the night with Miss Smith then quickly tires of her, yet she persists. He receives his first letters from his wife Sophia since the Leopard was left in the Dutch East Indies, so long ago. Others write the report of Broke's victory, to speed the official news to England.

Captain Dalgleish on the mail packet Diligence carries a copy of the official report, and Aubrey, Maturin, and Mrs Villiers as passengers. The American privateer Liberty and another, unnamed, vessel, have lay in wait for Diligence and chase her on the northern route home. Diana is certain the privateers have been hired by the vengeful Johnson, who will spare no expense in recovering the intelligence papers and the priceless heirloom diamond, the Blue Peter, which Stephen and Diana have stolen from him. The Liberty eventually wrecks on submerged ice in the foggy Grand Banks, her crew taken aboard by her follower, while the Diligence escapes and reaches the English Channel in 17 days. News of the victory is well-received in England, but Jack is eager to get home. His daughters and son have grown much since he last saw them, and his wife Sophia has admirably managed the ploys of the projector Kimber, in whose fraudulent schemes Jack has unwisely invested much of his fortune. Stephen visits Ireland for his uncle. He gives Johnson's private papers to Sir Joseph Blaine and asks him for Diana's release, whose American citizenship has caused her to be held in British custody. Blaine also recommends a lawyer for Aubrey to deal with the projector. Taking Diana with him, Stephen travels to Paris on a strictly scientific trip to present his work at the Institut de France, which he hopes will have the additional effect of quieting French suspicions that he is an intelligence agent. At the Institut, Diana wears the Blue Peter, of which she is quite fond. Stephen learns of the death of a Catalan poet, Ponsich, on an intelligence mission near Pomerania.

Jack's uncanny knack for inviting trouble on land is compounded when he begins receiving letters at home from Miss Smith, who claims to be pregnant by him, though Stephen suggests she is lying. Stephen visits Blaine again, who explains that Ponsich was killed during a botched diplomatic mission to capture the battery fortifying the French-held island of Grimsholm, off the coast of Denmark in the Baltic Sea. The battery is manned by Catalan revolutionaries assigned there by Bonaparte and kept loyal through false promises. They are led by Colonel Ramón d'Ullastret, who coincidentally is Stephen's godfather. Blaine explains that Grimsholm is too heavily fortified to be taken by force, but suggests that if the Catalans could be persuaded to surrender the island, it would change the situation in the Baltic enough to allow Prussia to join the offensive against Bonaparte. Stephen volunteers to perform the mission himself, with Jack as his captain.

Jack is offered command of the sloop HMS Ariel, leaving on the next tide, with no time to stop at home for his sea chest. Mr Pellworm, an experienced Baltic pilot, is on board when he arrives, and Mr Jagiello, a young and handsome Lithuanian officer with the Swedish army, will serve as a translator. Passing Elsinore, Danish shore batteries fire upon Ariel but miss the ship. At Carlscrona, they meet with commander of the Baltic fleet Admiral James Saumarez to devise a plan to land Stephen safely on Grimsholm: they will capture a Danish vessel, load her with wine and tobacco, and earn the battery's trust by bringing fresh supplies. Ariel chases a suitable vessel for some time but then discovers the Dutch privateer Minnie heading towards Grimsholm. Attempting to escape by luring Ariel into a tangle of shoals and reefs off the Danish coast, Minnie runs aground. Several French officers whom Minnie had been carrying to Grimsholm escape to the mainland, though Ariel captures the rest. The Ariels work feverishly to refloat the Minnie. Stephen and Jagiello question some of the captured sailors about the proper signals for approaching Grimsholm, but Stephen senses their deception. He suggests to Jack a new tactic: the Minnie, flying Dutch colours, will feign being chased by Ariel as she approaches the battery, which may allow outdated signals to be overlooked and the Minnie to land. The Ariels sailing the Minnie are disguised as Danish merchants.

The ruse works, though the Ariel gets dangerously close to the battery's guns. When Stephen begins speaking Catalan and greets Colonel d'Ullastret, he is accepted by the garrison and manages to convince them to turn against Bonaparte over dinner. No lives are lost as the British take the fortified island. Admiral Saumarez welcomes Colonel d’Ullastret, pleased with their success. The Colonel boards the Ariel, while the Catalan garrison travels in troop transports to Spain with Aeolus as escort, again navigating the narrow channels past Denmark. They fall in with an enormous international convoy of merchant ships escorted by the Royal Navy. Near Gothenburg, an Ariel crewmember drops the ship's only chronometer in heavy seas, so they sail into the North Sea and the shallow waters of the English Channel unable to accurately chart their exact location and without the Aeolus, which has taken refuge from the storm, leaving Ariel and her transport ships alone. Mr Pellworm predicts a fierce gale will beset them, but Jack is eager to reach the Bay of Biscay before it strikes. In heavy rains, Ariel meets one French ship, the Méduse, being chased by HMS Jason. Jack signals the troop transports to part so that Ariel can intervene to allow Jason to catch the fast-sailing Méduse.

Having done some damage to Méduse, Ariel is embayed in Douarnenez Bay on the coast of Brittany. While trying to beat their way out, a mishap causes the Ariel to strike a rock and she is washed ashore. The officers and crew are taken as prisoners of war by French soldiers on shore. Colonel d’Ullastret is given a Marine's uniform and a false name, and he promptly escapes overland. Jack, Stephen, and Jagiello are taken to Paris with the terse Monsieur Duhamel and lodged in the Temple, an ancient prison now being gradually demolished. Jack works on a way to escape from their cells by removing heavy stones in the privy chute, with help from Jagiello. Stephen is questioned by competing French intelligence groups; from one he learns that Diana has miscarried. To his surprise and suspicion, Duhamel makes an offer from parties expecting the emperor's defeat. He brings the prisoners English newspapers, from which Jack happily learns that HMS Ajax took Méduse, making his efforts worthwhile, and that Miss Smith has married.

Before Duhamel can return to collect him, Stephen is taken once more for questioning and deduces that an immense sum has been offered for his release when one of the interrogators mentions someone has paid "half Golconda" to the French authorities. Suddenly, Johnson arrives at the interrogation and identifies Stephen as the killer of Dubreuil and Pontet-Canet; Stephen is immediately taken to a dungeon cell, where he expects to be tortured, but is returned to Jack and Jagiello the following day. Now desperate to escape as soon as possible, the trio hurries to finish their excavation in the privy chute, but Duhamel arrives just as the last stone is removed. Convinced that Duhamel's offer is sincere, he leads them out of the Temple, picks up Diana, and remarks how Jack's escape shaft will be the explanation for their disappearance. They board the packet ship HMS Oedipus under Jack's long-time midshipman and newly promoted captain William Babbington. Stephen's mysterious benefactor turns out to have been Diana, who has given up the Blue Peter, a diamond from the Golconda mines, to a French minister in exchange for his release, though she is unaware of Stephen's escape having been procured through Duhamel. As the ship crosses the Channel to England, Stephen and Diana are finally married, with Jack giving her away and Babbington officiating.

Characters See also Recurring characters in the Aubrey–Maturin series

Halifax Jack Aubrey: Captain recently escaped as prisoner of war of the Americans, learns his next ship was assigned to another captain. Stephen Maturin: Ship's surgeon, physician, natural philosopher, friend to Jack and intelligence officer. Diana Villiers: Cousin to Sophia, and the love of Stephen's life, who becomes his wife. She was introduced in Post Captain. Mr Wallis: Lieutenant in command of HMS Shannon coming into Halifax. Mr Falkiner: Lieutenant in command of the prize, USS Chesapeake, coming into Halifax. Philip Broke: Captain of the Shannon, seriously injured from head wounds from the battle with Chesapeake. Admiral Colpoys: Port admiral in Halifax for the Royal Navy. Lady Harriet Colpoys: Wife of the admiral, accepts Mrs. Villiers as house guest, and hosts a ball to celebrate the victory. Major Beck: Army intelligence office in Halifax, who read the papers Maturin collected. James Lawrence: Captain of the USS Chesapeake, died en route to Halifax from his wounds in the battle, where the British buried him. Miss Amanda Smith: Attractive and deceptive woman who pursues Aubrey in Halifax. Mr Dalgleish: Owner and captain of the hired mail courier Diligence sailing out of Halifax.

England Sophia Aubrey: Jack's wife and mother of their three children. She was introduced in Post Captain. Mr Kimber: The schemer (projector) with a process to recover the lead and silver from "valuable dross" on Aubrey's land, now unwanted by Aubrey and pursued by his lawyer. He was introduced in the fifth novel, Desolation Island. General Aubrey: Jack's father, recently associating with the Radical party in Parliament, teaching his grandchildren how to campaign and to vote at Ashgrove Cottage, a dead weight on his son's career. Sir Joseph Blaine: Senior figure at the Admiralty and Maturin's spymaster.