Robert Wharton (January 12, 1757 – March 7, 1834) was the longest-serving Mayor of Philadelphia, Pennsylvania.
Wharton was born in Philadelphia, January 12, 1757, the son of Joseph Wharton, a successful merchant. At an early age he left his studies, and was apprenticed to a hatter. He entered the counting-house of his brother Samuel, a Philadelphia merchant, but he spent much of his time in outdoor sports, and until 1818 was president of the famous fox-hunting club of Gloucester, New Jersey that was organized in 1766. In 1790 he became a member of the Schuylkill Fishing Company, a social club, of which he was president 1812–1828.
He was a member of city council from 1792 till 1795. In 1796 he was made alderman of Philadelphia, and in that year quelled a riot among the sailors, who had organized themselves into a body and demanded higher wages. After reading the riot act he requested them to disperse, and, being received with shouts of defiance, Wharton ordered each of his men "to take his man," and the sailors were captured and imprisoned. He quelled the Walnut Street Prison riot in 1798, and also took part in suppressing others.
He was fifteen times elected mayor of Philadelphia between 1798 and 1824. After serving two one-year terms, 1798–1800, he declined nomination in 1800. He served three more terms, 1806–1808 and 1810–1811, then on being re-elected in 1811, he declined to serve. Subsequently, he served nine more terms, 1814–1819 and 1820–1824. His 14 years of service and 15 elections to the office make him the longest-serving and most-elected mayor in Philadelphia's history.
He became a member of the First Troop Philadelphia City Cavalry in 1798 and served as its captain from 1803 to 1811. In 1810, the six troops of cavalry in the city were organized into a regiment, of which Wharton was elected colonel. Later, he was elected brigadier-general of the state militia. He was vice-president of the Washington Benevolent Society, of which he was an original member.
Wharton married Salome Chancellor. He died in Philadelphia, March 7, 1834.