David Allan (13 February 1744 – 6 August 1796) was a Scottish painter and illustrator, best known for historical subjects and genre works. He was born at Alloa in central Scotland. On leaving Foulis's academy of painting at Glasgow (1762), after seven years' successful study, he obtained the patronage of Lord Cathcart and of Erskine of Mar, on whose estate he had been born. Erskine made it possible for him to travel to Rome (1764), where he remained until 1777, studying under Gavin Hamilton and copying the old masters.
In 1771 he sent two history paintings, Pompey the Great after his Defeat and Cleopatra Weeping Over the Ashes of Mark Antony (both now lost) to the Royal Academy exhibition in London. In 1773, still in Rome, his Hector’s Farewell from Andromache won the Accademia di S Luca's gold medal.
Among the original works which he then painted was the "Origin of Portraiture", now in the National Gallery at Edinburgh—representing a Corinthian maid drawing her lover's shadow—well known through Domenico Cunego's excellent engraving. This won him the gold medal given by the Academy of St Luke in the year 1773 for the best specimen of historical composition. While in Italy he also visited the kingdom of Naples, where he was well received by Lord Cathcart's brother, Sir William Hamilton, British ambassador. Allan made many lively drawings of street life in Rome and Naples.
Returning from Rome in 1777, he lived for a time in London, and occupied himself with portrait-painting. In 1780 he removed to Edinburgh, where, on the death of Alexander Runciman in 1786, he was appointed director and master of the Academy of Arts. There he painted and etched in aquatint a variety of works, including those by which he is best known, such as "Scotch Wedding", "Highland Dance", "Repentance Stool" and his "Illustrations of the Gentle Shepherd" (based on Allan Ramsay's poem The Gentle Shepherd). He was sometimes called the "Scottish Hogarth", although he lacked Hogarth's satirical qualities. Amongst his students was Alexander Carse whose early works include Allen's influence. He also produced illustrations for a version of James Macpherson's Ossian poems.
He died in Edinburgh and his grave can be found at the Old Calton Burial Ground in the city. The headstone, which features a portrait relief, was paid for and erected by the Royal Scottish Academy.