Ukip has said its campaigners posed for a picture with Britain First activists by “mistake” and did not understand “the nature of the group”.

Britain First had posted the picture, taken on Saturday in Rochester where both groups are campaigning for the upcoming by-election, on its website.

It showed three Ukip campaigners, wearing party T-shirts and rosettes, smiling with their arms around Britain First’s Parliamentary candidate Jayda Fransen.

“The day was marked by the great and friendly reception we received from the Ukip activists,” Britain First’s report of the day said.

Ms Fransen, the deputy leader of Britain First known for her role in its so-called “mosque invasions”, said Nigel Farage’s followers had “expressed support” and asked for the picture.

“We were just having a chat about how our policies are very similar to Ukip’s, in fact they almost mirror them,” she told Buzzfeed.

But Ukip rejected any similarities with the far-right group and claimed its campaigners had been duped.

“We have no connection with Britain First and reject any association with them,” a spokesperson told The Independent.

“A handful of our 200 campaigners on Saturday were photographed by Britain First without understanding the nature of the group and regret that very much.

“They were identified, contacted, advised, and accepted all the sensible undertakings we asked for. A mistake of this nature will not happen again.

"As we have discovered, this is a typical technique of Britain First, a form of political photobomb, to pretend that they have support elsewhere. They do not."

Comments on Britain First’s Facebook page showed how close the group’s followers consider their values and Ukip’s.

Ukip gaffes and controversies Show all 18 1 /18 Ukip gaffes and controversies Ukip gaffes and controversies European elections poster Party's latest EU election posters branded 'racist' and compared to BNP campaigns Rex Ukip gaffes and controversies Farage 'car-crash' interview Ukip spin doctor forced to intervene as Farage falters in disastrous radio interview Ukip gaffes and controversies Neil Hamilton Picture Exclusive: The year is 1998. The venue is a Springbok Club meeting. The flag is a symbol for white supremacists in South Africa. And the speaker is Ukip’s deputy chairman, Neil Hamilton Ukip gaffes and controversies Kerry Smith Kerry Smith resigned as would-be MP for South Basildon and East Thurrock after it emerged he had mocked gay party members as “disgusting poofters”, joked about shooting people from Chigwell in a “peasant hunt” and referred to someone with a Chinese name as a “Chinky bird” PA Ukip gaffes and controversies Natasha Bolter Former Ukip member Natasha Bolter was suspected of not having the teaching qualifications she professed to, only days after it was revealed that claims of her having attended Oxford University were also false PA Ukip gaffes and controversies Ukip Calypso song Mike Reid released a single in praise of UKIP trying to control the UK's borders, only to withdraw the single after being accused of racism for singing in a Jamaican accent Ukip gaffes and controversies Janice Atkinson Janice Atkinson, Ukip's South East chair, pictured by protesters while campaigning in Ashford, Kent with local party chair Norman Taylor Facebook/Maria Pizzey Ukip gaffes and controversies Ukip cancels Freephone Ukip cancels Freephone number after protesters repeatedly called to push up costs Getty Images Ukip gaffes and controversies Farage 'car-crash' interview Mr Farage appeared to be caught out on a number of issues, from Romanian neighbours to people speaking foreign languages on the train Ukip gaffes and controversies Ukip employs illegal immigrants Ukip criticised after European election candidate found employing illegal immigrants AP Ukip gaffes and controversies Magnus Nielsen Ukip candidate: 'Take away the right to vote to improve election turnout' Getty Images Ukip gaffes and controversies Poster model A “British builder” portrayed in a Ukip poster accusing EU workers of taking UK jobs turns out to be an Irish actor - aka a migrant worker Ukip gaffes and controversies 'Arrest protesters' Ukip called for police to arrest protesters ‘who call us fascists’ ahead of showdown with anti-fascist groups in Brighton Ukip gaffes and controversies London Live make-up Ukip's Nigel Farage reportedly refused to go on London Live 'without professional make up-artist' Reuters Ukip gaffes and controversies Andre Lampitt Ukip forced to suspend the "poster boy" of its European election broadcast, after it was revealed he had posted a series of vile racist comments on Twitter Ukip gaffes and controversies Expenses Nigel Farage says he is taking taking legal advice over “outrageous” allegations that he is responsible for more than £50,000 of “missing” EU funding that was paid directly into his personal bank account Ukip gaffes and controversies Have I Got News For You Nigel Farage appears in Have I Got News For You, spends the entire episode being ridiculed over expenses and party 'fruitcakes' BBC Ukip gaffes and controversies Anti-gay comments Local branch chairman for Ukip defends a party's councillor candidate Douglas Denny who called gay people “abnormal” and said he wished “they stop trying to ram it down my throat”, all while discussing whether the word “sodomite” should be used

One supporter wrote: “Both parties have the same goals and at times like this you need unity not division.”

“Oh a coalition maybe? I'll vote for that,” another added.

On the day the photo was taken, a video of Britain First’s activities in Rotherham showed candidate Ms Fransen being escorted out of the Conservative campaigning office and confronting a group of worshippers outside a mosque.

Claiming she “spoke for the British people”, she said the town would “suffer” if a proposed new mosque was built.

“Do the people of Medway want a repeat performance of what’s gone on in Rotherham?” she said.

“Is there any governing of what’s being spewed out of these mosques – the hatred, the incitement of violence, the incitement of terror, grooming gangs.

“What are you going to condemn that? Then you can have your mega-mosque when you can all prove you’re peaceful.”

The Gillingham Mosque, in Canterbury Street, is run by the Kent Muslim Welfare Association, which is a registered charity listing aims including “serving the wider host community and strengthening community cohesion”.

It also has a youth wing called KMWA Youth, which works to “create a healthy, well-balanced community” and promote religious tolerance.

The Rochester and Strood by-election was sparked when its Tory MP, Mark Reckless, defected to Ukip, who he is standing for in his bid for re-election.