Prof Ged Martin looks at a disputed Havering election nearly 200 years ago

Americans elect their judges. In Britain, they're appointed. Our system puts them above politics. But there was one exception.

In 1465, the royal manor of Havering (the modern borough west of the Ingrebourne) became a Liberty, a medieval unitary authority carved out of Essex. One of the "discreetest and honestest" inhabitants could be elected a magistrate.

The choice was usually settled among influential local families. Magistrates needed to understand the law, and have leisure to attend courts.

But when a vacancy occurred in 1836, Havering exploded. Four years earlier, the Reform Act had challenged ancient institutions. Now the issue was personal.

The local elite nominated Octavius Mashiter, of Priests, a mansion he'd built off Collier Row Lane. Priests Avenue marks the spot. Octavius was a lifelong resident, with "an independent fortune".

Unfortunately, his brother, Thomas Mashiter, of Hornchurch Lodge (the site is now Lodge Court) was already Havering's High Steward, president of the mini-republic.

For a century, John Tyler's family had farmed at Mardyke in South Hornchurch (now Orchard Farm). Tyler thought Octavius was "a very worthy man", but insisted it would be "impolitic" to have two brothers running Havering.

Tyler nominated a rival candidate, Edward Young Hancock of Hornchurch. Nothing is known of Hancock.

It was decided to hold a poll, spread over a Monday and Tuesday in February. The High Steward recruited two independent gentlemen to act as tellers. There was no secret ballot.

But who could vote? There hadn't been a contested election since 1608. Legal opinion advised that any male householder, rich or poor, was eligible. (Women were excluded from such serious matters.)

But in the 19th century, many single men were lodgers, renting rooms in other people's houses. Havering's lodgers objected to their exclusion from the election.

Some claimed they occupied side premises - we'd call them granny flats - and so had separate accommodation. Others said they were trusted with front doorkeys, which they argued made them co-householders.

The tellers decided to allow everybody to vote, but to register the lodger votes separately.

Passions ran high. It's noteworthy that Hancock's election manager was the Reverend Samuel Carlisle, a combative Nonconformist minister who challenged the local Anglican elite.

Hancock won few votes from Noak Hill or Havering: in these sleepy areas, landlords ruled the roost. Most Romford shopkeepers refused to vote at all, thus avoiding giving offence to either side.

Coming to Romford to vote on a working day was a big effort for many Hancock supporters. If you'd walked all the way from Collier Row or Hacton Lane, you expected some appreciation. As a friendly gesture, the Hancock party bought drinks in the pubs.

Mashiter's supporters denounced this as "treating", an election offence like bribery.

In retaliation, Hancockites alleged intimidation by their posh and powerful opponents.

When the poll closed on the Tuesday, the High Steward and tellers "most wisely" scuttled away to count the votes, followed by "the most respectable part of the audience", leaving "Mr Hancock's friends" engaged in angry "speechifying".

The officially accepted votes put Octavius Mashiter ahead, with 455 votes to Hancock's 341.

But, if the disputed lodger votes were included, the result was Hancock 511, Mashiter 503.

With an unofficial majority of just eight, Hancock was unlikely to get over the line. To win, he'd need almost all the disputed ballots to be allowed, which was a long shot.

A barrister who was an expert in election law checked each voter's qualifications and - you've guessed it - Mashiter was declared the winner.

He proved a diligent official, not just in hearing court cases. In the days before elected councils, magistrates dealt with local emergencies, which meant they had to be constantly available. For thirty years, Octavius Mashiter rarely spent a night away from home.

Elections sometimes trigger - or reveal - deep divisions in a community. But, eventually, the passions subside, the issues are forgotten and everybody moves on.