In 1703, during the War of the Spanish Succession, he was present at the Battle of Caia in Portugal. In 1711 he became Governor of Gibraltar. Except from a personal perspective he was unsuccessful as a governor, as his main achievement was to become richer than when he arrived. Observers felt that he should have concentrated on encouraging the Dutch to leave so that the benefits of the Capture of Gibraltar (in 1704) could be directed entirely in Britain's direction. Stanwick was tenacious as even when he was replaced by David Colyear he stayed on as lieutenant-governor for some months.
In 1713 in returned to England and became Mayor of Carlisle for 1715 as well as Deputy Lieutenant of Cumberland, thereby increasing his influence in the Carlisle area. He was a Whig MP who strongly supported Robert Walpole.