A defeated independent candidate at the local council elections has demanded a recount after his Conservative Party opponent was awarded victory thanks to a single ballot that had “Brexit” scrawled on it.

Cotswold District Council has defended its decision to accept the voting slip and grant victory to Tory candidate Stephen Hirst in the Tetbury town ward contest.

The returning officer claimed everything had been done in line with Electoral Commission rules, despite the fact the paper had no cross and “Brexit” written on it, with only an arrow pointing towards the Conservative candidate.

The independent candidate Kevin Painter – beaten 232 votes to 231 – described the decision as “absolutely unbelievable”. He said he would submit a formal request for a recount and take the matter to court if necessary.

“It is more Blackadder than anything else,” Mr Painter told The Gloucestershire Echo. “The rules are quite simply you have to put a cross in the box. I am absolutely stunned by the response. The rules now make me doubt the integrity of our elections.”

Farage launches his new Brexit Party: in pictures Show all 10 1 /10 Farage launches his new Brexit Party: in pictures Farage launches his new Brexit Party: in pictures Nigel Farage speaks at the launch of his new Brexit Party's campaign for the European elections Reuters Farage launches his new Brexit Party: in pictures Brexit Party candidate Annunziata Rees-Mogg, sister of Conservative MP Jacob Rees-Mogg, speaks at the launch AFP/Getty Farage launches his new Brexit Party: in pictures A supporter waits for Farage to speak AFP/Getty Farage launches his new Brexit Party: in pictures Supporters wait for Farage to speak AFP/Getty Farage launches his new Brexit Party: in pictures Farage's socks Reuters Farage launches his new Brexit Party: in pictures Farage and prospective candidate Annunziata Rees-Mogg wait at the launch AFP/Getty Farage launches his new Brexit Party: in pictures Supporters listen as Farage speaks AFP/Getty Farage launches his new Brexit Party: in pictures Free T-shirts for all attendees AFP/Getty Farage launches his new Brexit Party: in pictures Posters on the seats for supporters of the Brexit Party AFP/Getty Farage launches his new Brexit Party: in pictures A safety sign is pictured AFP/Getty

Ballot spoiling is not illegal, but filling it out incorrectly or covering it with graffiti will render it invalid. Under Electoral Commission rules, a ballot must be clearly spoiled for it to be discounted.

The returning officer for Cotswold District Council issued a statement, explaining: “Prior to the final adjudication on the doubtful papers, the number of votes for the Conservative candidate and the independent candidate were level.

“However, when adjudicating on those ‘doubtful’ papers, the returning officer awarded one additional vote to the Conservative candidate, having regard to the guidance contained in the Electoral Commission’s booklet on doubtful papers and examples within election law books.”

Disillusioned voters boasted on social media about spoiling their ballot papers at the local elections as a way of venting their anger over Brexit. One wrote: “I’d rather poo in my hands and clap than vote for this lot.”