The Thirteen-Gun Salute is the thirteenth historical novel in the Aubrey–Maturin series by Patrick O'Brian, first published in 1989. The story is set during the Napoleonic Wars and the War of 1812.
This novel constitutes the first of a five-novel circumnavigation of the globe; other novels in this voyage include The Nutmeg of Consolation, Clarissa Oakes/The Truelove, The Wine-Dark Sea, and The Commodore.

Spain hears that England may be supporting the independence of its colonies in South America, while an envoy is needed in the Malay states to gain an ally for England. These two changes alter Aubrey's mission from his private man-of-war, Surprise en route to South America. They learn this at Lisbon, where Surprise parts company under Tom Pullings. Aubrey is reinstated on the Navy List in London and gains command of HMS Diane, carrying the envoy to negotiate a treaty with Pulo Prabang and Maturin gains a stay in a naturalist's paradise. Then the Diane is en route to a rendezvous with Surprise, when shoals and a typhoon challenge the Diane and her crew.

Reviews of this novel follow the plot but are more properly reviews of the series to date, as W W Norton began publishing the series of novels in the US. Richard Snow, writing in The New York Times, said they were "the best historical novels ever written." Many in the US took note of his article and sought out the novels. Writing about this novel, comments include that "the ultimate appeal of the Aubrey/Maturin adventures lies in O'Brian's delicious old-fashioned prose" that is "sketching with apparent accuracy and truth the early 19th-century world." Another reviewer finds "There is a recklessness with plot that is intentionally subversive of the genre", while showing "a dazzling receptiveness to language, an understanding of period speech so entire". O'Brian's style has been compared to that of Jane Austen. As to this novel's plot, "the most charming segment is Maturin's idyllic stay in a remote valley, where he blissfully encounters and studies a variety of tame exotic beasts." and "twists of plot are swift, drastic, on occasion comic," and sometimes grotesque.

Plot summary
On land after ceasing his use of laudanum, Stephen Maturin finds he has changed; his naturally "ardent" temperament returns and alters his relationship with his wife Diana, who is now pregnant with their child. Maturin looks forward to the arrival of the child he is certain is a daughter. As the high level traitor in British intelligence is not yet identified, the time on land raises risks to his friend Jack Aubrey, who agrees to sail immediately. Aubrey, Maturin, and their shipmates prepare for a mission to sail the letter of marque Surprise on a mission to South America. Upon reaching Lisbon, Sir Joseph Blaine intercepts Maturin with news that he and Aubrey are required to carry a diplomat to the Sultan of Pulo Prabang, a piratical Malay state in the South China Sea. Edward Fox is the envoy leading the mission to persuade the Sultan to become an English rather than French ally. The French mission includes the same English traitors - Ledward and Wray - who were responsible for Aubrey's former disgrace. With the Surprise under the command of Captain Pullings, Aubrey and Maturin return with Blaine to England, where Lord Melville, First Lord of the Admiralty, reinstates Aubrey as a Post-Captain in the Royal Navy and gives him command of the recently captured French ship Diane. The voyage south forms the crew, with frequent training on the guns; by the luck of a timely breeze and much hard rowing in the ship's boats, Diane escapes the inshore currents of Inaccessible Island. Sailing through the high forties (south latitude), she first touches land at Java, meeting Lieutenant Governor Raffles near Batavia, where they hear the first word of bank failures in England.
Arriving in Pulo Prabang, Maturin meets fellow natural philosopher van Buren and helps the arrogant envoy Fox plot against the French mission. During the leisurely negotiations with the Sultan, Maturin climbs the "Thousand Steps" to Kumai, a protected valley in the crater of a volcano and home to the orangutans he has been longing to see. Returning to town, he learns that Abdul, the Sultan's cupbearer and catamite has been caught in a compromising position with both Ledward and Wray. Abdul is executed and Ledward and Wray are banished from the court for their indiscretions, effectively ending the French mission. Wray and Ledward are eventually assassinated and Maturin and van Buren dissect their bodies.





