The subject of the popular song came from a family of parliamentarians and, J B Seatrobe reveals, he had two stints in the Commons, where he voted according to his conscience

Bobby Shafto's gone to sea,Silver buckles on his knee;He'll come back and marry me,Bonny Bobby Shafto!

The eponymous hero of the wellknown traditional song was, in the latter half of the 18th century, a Member of Parliament, first for the County of Durham, and then for Downton in Wiltshire.

His family provided many Members of Parliament over the years, including his uncle, Robert Shafto (MP for Durham City 1712-13, 1727-29); his father, John Shafto (MP for Durham City 1730-42); his son Robert Eden Duncombe Shafto (MP for Durham City 1804-06), and his grandson Robert Duncombe Shafto (MP for North Durham 1847-68).

Shafto became an MP for the first time in 1760, aged approximately 28, in a byelection. Though he came from a family of Tories - in whose interest both his father and uncle had sat - his patrons for the election were local Whig magnates, whose choice received the support of the Prime Minister, the Duke of Newcastle. However, Newcastle did not know the identity of their nominee, and was surprised to hear that he had backed blind someone with such a Tory background. This was compounded when a more orthodox Whig, Sir Thomas Clavering, declared as a candidate and sought party support, and it seemed that Shafto had tacit Tory backing in the campaign.

Despite these pressures, Shafto declared his support for the Whig ministry, retained the patronage of his initial patrons, and won the 9 December poll by 916 to 545. He repeated the victory against the same candidate on 1 April 1761 at the following general election, coming top of the poll with 1589 votes, to the other successful candidate's 1553 and Clavering's 1382.

Throughout that seven-year Parliament, which, with a brief Tory interlude in 1762-63 under the Earl of Bute, was Whig-controlled, his voting record displayed opposition tendencies. He decided not to stand for re-election at the 1768 general election.

Shafto's second period in the House, as member for Downton, was marked by a long-running struggle between his faction - supported by his landed interests in the area gained through his wife, Anne Duncombe - and a faction led by the Earl of Radnor for control of the electors and electoral machinery of the constituency. Many of the elections at Downton during the period from 1774 until Shafto's death in 1797 were the subject of dispute, with challenges through petitions to the Commons.

At a by election on 17 December 1779, Shafto stood against Radnor's candidate, but was defeated by eight to three. He successfully petitioned the House of Commons, alleging that many valid votes for him were ignored, and was declared elected on 21 February 1780. Shafto and his Duncombe family ally, Henry Conway, won the two Downton seats at the subsequent 1780 general election, winning 33 and 32 votes respectively to the Radnorite candidates' eight and seven votes. However, this victory on 13 September was secured partly by a sleightof- hand over the appointment of a new returning officer on the death of the longserving incumbent earlier in the year.

Two elections in 1784 saw the electoral feud at its peak, when at both the general election poll on 6 April, and a subsequent by election on 26 July, each side produced its own returning officer, with the obvious outcome of two different results. The Commons, after examining the votes of the general election poll, produced a revised result which showed Shafto elected with 41 votes, but a tie, on 40 votes, for the second seat, which was declared void. Following the second poll, Shafto's candidate, Conway, was declared elected by the Comons.

However, Shafto's apparent electoral advantage was lost when Radnor won the right to select the returning officer at the 1790 and 1796 general elections. Shafto did not stand in 1796, and his two candidates were again defeated at the 28 May poll. He eventually abandoned his challenge to the outcome, after his attempt at a compromise with Radnor of having one member each was rejected!

Shafto's second period in the House again saw him voting with his conscience, though he was clearly leaning more to the Tory interest, especially under the premierships of North and the Younger Pitt. He apparently never made a speech.

As for the song itself, like many such traditional ballads, it has unclear origins and has been much changed and added to over the years. It has been suggested that it was used as a campaign song for Shafto in the 1761 election at Durham, especially the verse:

All the Ribbons flying about,

All the ladies looking out,

Clapping their hands and giving a shout,

Hurrah for Bobbie Shafto.

Several sources suggest that it was expanded and used by his grandson for his election at North Durham in 1861. But, as there seems to have been no such election, this must be treated with caution. Whatever the truth, it is clear that posterity remembers the Shafto name not for his sustained parliamentary connection, but for a song sung mainly by children.