HMS Surprise is the third historical novel in the Aubrey–Maturin series by Patrick O'Brian, first published in 1973. The series follows the partnership of Royal Navy Captain Jack Aubrey and his ship's surgeon Stephen Maturin during the wars against Napoleonic France.

In the story, Maturin's work as an intelligence agent gets him into trouble just as Aubrey takes command of a new ship, HMS Surprise. Later, the friends embark on a long voyage to bring an ambassador to Southeast Asia, rounding the southern tip of Africa.

The novel is often considered one of the best in the series. Some reviewers found it had "superb depictions of life", yet too full of nautical detail, while others found that detail part of the author's erudition and not in the way of the plot. The author showed "capacity for creating another completely believable world", while another reviewer said the novel is "stretching its genre [naval adventure] but never escaping it."

Plot summary Shortly after the events of Post Captain, the Admiralty debates the prize money to be awarded to Aubrey and the other captains of the convoy involved in the recent action off the coast of Portugal, in which several Spanish treasure ships were intercepted carrying the price of Spain's entry into the war on the side of France. On the quibble that Spain had not yet formally entered the war, the new First Lord of the Admiralty decides the vast sum is a "Droit of the Admiralty" and thus is not to be shared out with the captors. Jack is disheartened to hear that his reward will be much less than he and Sophia had expected. The First Lord also makes a blunder by mentioning the name of intelligence agent Stephen Maturin during the proceedings, putting Maturin at risk.

Unconcerned, Stephen goes on a mission to Minorca and arranges for Jack, still acting commander of HMS Lively and now on blockade duty near Toulon, to pick him up at Port Mahon. Lively pursues and burns a French supply ship, from which Jack gains valuable loot: a gunboat and a French signal book. When Stephen fails to show up at the rendezvous point, Jack learns from a Catalan revolutionary that his friend has been captured by French intelligence and is being held in Port Mahon in the former home of Admiral Harte, which Jack knows well. Jack and a rescue party use the captured gunboat and the French signals to slip into port unmolested. They storm the house and rescue Stephen, who has been brutally tortured, and kill most of the French interrogators.

Back in England, Stephen tries to recover his strength and the use of his flayed hands. Jack is taken by bailiffs and held in a sponging-house until he can pay off his debts. His marriage to Sophia Williams is deferred, as her mother insists that he be debt-free. Sir Joseph Blaine visits Stephen, who tells Blaine of his capture and Aubrey's predicament, requesting that Jack be advanced his pending reward and released. Blaine promises to help, and also gives Aubrey command of a new ship, HMS Surprise. Before he embarks, Jack meets Sophia in a coach in the middle of the night, and they promise to marry no one else.

Aubrey and Maturin depart in the Surprise with orders to ferry an ambassador, Mr Stanhope, to the Sultan of Kampong on the Malay Peninsula. Stanhope almost immediately takes to his cabin with seasickness. Surprise is caught in the doldrums north of the equator, and the crew begins to show signs of scurvy. Stephen insists that they touch on the coast of Brazil to obtain fresh fruits. On a very hot Sunday, the doctor requests a boat for a quick visit to St. Paul's Rock, and Second Lieutenant Nicolls agrees to row him out. The rocky islet and the nearby Surprise are suddenly struck by intense squalls; Nicolls drowns and Stephen survives for two days on bird-fouled water and the blood of the resident boobies. A badly damaged Surprise recovers Stephen, who remarks that the days under the hot sun have restored his health after the torture. The ship then stops in Brazil for repairs. This is Stephen's first time in the New World, so he explores the jungle and returns with a sloth, which Jack introduces to alcohol. They also put in at Rio for mail, where Jack learns that Admiral Linois, who once took him prisoner, is patrolling the Indian Ocean at the head of a French squadron.

Refitted and repainted, Surprise maintains a cautious distance while rounding the Cape of Good Hope, held by the Dutch who are allied with Napoleon. Nearing the waters of the Antarctic Ocean, Surprise endures a severe storm, and Stanhope becomes very ill. They put into Bombay in British India to refit after the storms and rest the ambassador. Stephen meets a local street girl named Dil, who eagerly shows him around the city. He is watching a parade with Dil when he sees Diana Villiers, who has returned to Bombay ahead of her companion, the wealthy merchant Richard Canning. Stephen and Diana agree to visit, and spend several days together, at the end of which Stephen asks her to marry him. Diana does not give an answer but promises she will when Surprise stops in Calcutta. Stephen later finds Dil dead and her body looted of the valuables he had given her; he supervises her cremation on the shore.

Soon after the voyage resumes Stanhope becomes ill again. His condition grows more serious with each passing day, and before reaching the Sunda Strait they are compelled to find solid ground to help him recover. Pullings recommends a tiny beach surrounded by jungle, and they hastily bring the ambassador to it, where he dies a few hours later. Their mission now void, Surprise sets sail for home.

They encounter the East India Company's China Fleet, returning to England unescorted. A day after departing the fleet, Surprise spots Linois's squadron in the Indian Ocean. Surprise engages its smallest ship, the corvette Berceau, shredding her rigging; Jack bluffs by signaling to imaginary reinforcements beyond the horizon. Surprise pretends to be badly damaged while speeding back to the China Fleet to warn them and organise a defence. Though some of the merchant captains want to flee before Linois arrives, Jack convinces them that the only way out of the situation is to fight. The largest ships of the China Fleet are disguised as men-of-war and Jack distributes some of his officers to help them during the battle. As the French squadron closes on the Indiamen, Surprise engages Linois's warship, the Marengo; she is outgunned and in peril when one of the Indiamen suddenly engages the French ship from the other side, forcing Marengo to disengage. Damage forces Linois to abandon the chase in order to refit.

Ashore in Calcutta, Aubrey receives an enthusiastic welcome from the merchants, including Canning, who are happy to pay for Surprise repairs. As a personal reward, Canning offers Jack the opportunity to transport a chest of jewels as freight, which will earn him a portion of the cargo's value upon his arrival in England. Knowing the money will be enough to clear the last of his debts so he can marry Sophia, he immediately writes to her, asking her to meet him in Madeira.

During the refit, Stephen asks Diana for her answer to his marriage proposal, but Canning suddenly appears. In a fit of jealousy he slaps Stephen, who responds by challenging him to a duel. Canning's shot hits Stephen in the ribs, but Stephen's hits Canning in the heart, killing him. Stephen convinces Diana to return to England on a merchant ship that will leave immediately rather than tend to him as he recovers aboard the Surprise. With the help of Aubrey, M'Alister, and a mirror, Stephen stoically operates on himself, removing the bullet lodged beneath his rib. Jack tends to his friend during the worst of his fever. In his delirium the usually private Stephen voices many of his thoughts and secrets.

Arriving at Madeira, Jack is dismayed to learn that Sophia is not there; Stephen finds a note from Diana returning the ring he gave her and explaining that she has travelled to America with a wealthy man named Johnstone, whom she has agreed to marry. Stephen is devastated. Within a day's sailing, Jack overtakes the frigate HMS Ethalion under his loyal friend Heneage Dundas and finds that Sophia is aboard. Jack wants to get married immediately, but Sophia insists they do it properly, when they return to England.

Characters

Jack Aubrey: Captain in the Royal Navy on HMS Lively, and then appointed Captain of HMS Surprise. Stephen Maturin: Ship's surgeon, physician, natural philosopher, intelligence agent and close friend to Aubrey. Sophia Williams: Young beautiful woman promised to Jack Aubrey, of good family and good marriage settlement. Mrs Williams: Sophia's mother, a woman of unpleasant ways who wants her daughters well married. Cecelia and Frances Williams: Younger sisters of Sophia, each married before the Surprise reaches Bombay. Frances marries Sir Oliver Floode, MP, and Cecelia marries his younger cousin, a militia officer. Diana Villiers: Cousin to Sophia who escapes the Williams household to be kept by Canning, and who is the love of Stephen Maturin. Mr Hincksey: Reverend who lives near Mapes Court, visiting often. Mrs Williams pushes Sophia to marry him instead of her fiancé Aubrey. Instead, he officiates at the weddings of Cecelia and Frances. He is a friend to Rev Mr White. Sir Joseph Blaine: Head of naval intelligence, entomologist, and Maturin's contact. Mr Waring: Assistant to Sir Joseph and his likely successor upon Blaine's retirement. Mr Simmons: First lieutenant on HMS Lively, who is effective in the actions taking out French shore batteries, the destruction of French stores ship Dromadaire and taking the French gunboat, with its current signal book. The gunboat is used to retrieve Maturin from torture in Port Mahon. He told Aubrey of the engagement announced in The Times and of the gift the Livelys will give him and Sophia. Mr Randall: Second lieutenant on HMS Lively. Lord Garron: Third lieutenant on HMS Lively. He is met again in The Mauritius Command as captain of a brig in the action, at which point he has inherited the title "Lord Narborough", which suggests that "Lord Garron" was his courtesy title as the eldest son of a peer. Mr Fielding: Lieutenant on HMS Lively. Mr John Dashwood: Lieutenant on HMS Lively. Joan Maragall: Catalan friend of Maturin who leads Aubrey to him on Port Mahon. Captain Dutourd: The lead French interrogator and torturer at Port Mahon, and the one who escaped death when Aubrey rescued the prisoners. Possibly killed by the other prisoners after he left the building. Mr Hervey: First lieutenant on HMS Surprise until Bombay, where he joins his uncle, an admiral, for likely promotion. He does his work, but does not have the authority needed for best operation of the ship. Mr Stourton: First lieutenant replacing Hervey, more qualified for his role, especially during the action with Linois. Mr Nicolls: Second lieutenant aboard Surprise. He rows Maturin out to St Paul's Rocks. When the fierce storm hits, Maturin survives, but there is no trace of Nicolls or the boat. Before the storm, he tells Maturin of his troubles with his wife, who has not written to him to end the argument they had. Tom Pullings: Lieutenant in the Royal Navy, third of the Surprise, and considered a follower of Captain Aubrey. He is married now. His experience during the peace aboard East Indiamen serves HMS Surprise well as she nears Sunda Strait and Sumatra. Mr Babbington: Midshipman who is nearing his time to pass for lieutenant as Surprise slowly makes her way south in the Atlantic Ocean. He is appointed acting lieutenant when the second lieutenant is lost in the storm. He is always seeking female companions in port, sometimes leaving the ship without permission. Mr Callow: One of the young men in the midshipmen's berth. In the action against Linois, a block falls on his head, which he survives.