It’s a discovery that changes our understanding of British history – and it arises from just one word.

Until now, the first black voter in Britain was thought to be the composer Charles Ignatius Sancho, the British abolitionist who, as the owner of property in Mayfair, voted in the 1774 Westminster election.

But a chance discovery at the British Library by Dr Gillian Williamson, a historian researching lodgers in Georgian London, reveals a black man voted in an election 25 years earlier.

The revelation that John London, landlord of a pub in the capital, cast a vote in 1749, sheds new light on an era when the black population of London is believed to have been 10,000 strong, and the democratic process was limited but lively.

As a Westminster ratepayer, John London was among the no more than 14% of people who were entitled to vote at the time, a privileged position, Dr Williamson said. But in the hotly contested Westminster byelection of November 1749, his right to vote was challenged.

Dr Gillian Williamson.

Dr Gillian Williamson. Photograph: Dr Gillian Williamson

The winning candidate, Viscount Trentham, had taken the seat by just 157 votes. The loser, Sir George Vandeput, tried to fight the result in a process called a scrutiny, in which the validity of votes could be challenged, and of which written records survive.

As someone who had voted for the winner, London found his vote contested, initially on the grounds that he was not a ratepayer – rates being a parish tax based on property value and used for the welfare of the poor and services such as paving, lighting and street cleaning.

Once it had been accepted that John was a ratepayer – having just moved into premises at One Tun, which was on land now occupied by Charing Cross station, his vote was questioned on the grounds of race, with a witness for Vandeput calling him a “blackamoor”.

“It leapt off the page,” Williamson, who had been looking for examples of lodgers cajoled into committing voter fraud, said of the word, which she believes was used to imply John was born overseas and ineligible to vote.

“[It’s] a racist incident at a certain level, the idea being that ‘although he’s got his business and lives here and pays rates, he’s not quite one of us,’” she told the Guardian, having posted her findings on the History of Parliament Trust website.

But London, having turned up in person to defend his vote, confirmed he was born in Bury St Edmunds, and so the vote stood, as did the result.

It is known he ran his pub for two years but few other details can be found of London’s life until he was admitted to the workhouse in 1770 with a fever. But Williamson has established that he had named his alehouse The Blackamoor’s Head.

“I think that was an interesting reflection of his personality, his confidence, that he was taking a derogatory term and using it, saying: ‘It’s the black man’s pub,’” she said. “He has a business, he goes out to vote, he sticks up for himself.

“I think it’s interesting that he’s the first-known black voter – in some ways unexceptional, in some ways exceptional. It shows that black people don’t just serve in low-level gig economy work, that it’s not extraordinary to be black in Georgian London. You can see black people as always there.

“If you are a pub landlord, people know who you are. Keeping good order, stopping fights, you have to do all these things in Georgian London. [This discovery] helps us see someone in a more rounded way, as someone with status.”