The genteel cobbled lanes of Rochester, which have witnessed rebellion and conformity in turn over the centuries, are a natural venue for the defining political battle of the day.

A civil war on the right, which is sapping the authority of David Cameron, is playing out in the shadow of the battered shell of Rochester’s Norman castle as Tory MPs confront their former confrère Mark Reckless.

The battle encompasses both the high politics of the day, as the Tories respond to the apparently unstoppable momentum of the Ukip outsiders, and the drama of broken personal relations.

A byelection poll commissioned by Lord Ashcroft this week gave Ukip a 12-point lead in Rochester over the Tories – by 44% to 32% – as the Conservatives struggle against Ukip’s two core messages that are resonating in the Medway town. These are that successive governments have lost control of immigration and that Cameron symbolises an elite that has no feel for communities “left behind” by the recession, in the words of Robert Ford and Matthew Goodwin in their book on Ukip, Revolt on the Right.

Kelly Tolhurst, Conservative candidate for the Rochester and Strood byelection. David Cameron has urged Labour and Lib Dem supporters to vote for her to keep Ukip out. Photograph: Gareth Fuller/PA

The prime minister revealed how much the Tories are struggling when he issued a plea to Labour supporters to vote tactically against Ukip in favour the Conservative candidate Kelly Tolhurst. “Kelly is their choice,” he told the Kent Messenger as he asked Labour, Liberal Democrat and Greens to lend their votes to the Tories.

But the battle is also highly personal, as Reckless is finding out at every hustings where he is confronted by Peter Hart, a member of the local Conservative association who was on the original panel that selected him as the party’s candidate in the late 1990s. “Mark stood before us only two weeks before his defection to Ukip and told us he would not be doing this – to me that is absolutely disgraceful,” Hart told the Guardian. “I can still hardly believe he has done it. It is a bit like telling your wife you love her and then you’re planning to leave her the following morning.”

Mark Reckless (right), Ukip candidate for Rochester and Strood is joined by Ukip MP Douglas Carswell (left). Photograph: Gareth Fuller/PA

A select group among the scores of Tory MPs pouring into Rochester to prevent Ukip winning its second parliamentary seat also feel little love for Reckless. Tracey Crouch is MP for the neighbouring seat of Chatham and Aylesford and is playing a leading role in the Tory campaign; the govenment whip Therese Coffey and the historian backbencher Kwasi Kwarteng were both guests at Reckless’s wedding to Catriona Brown at Westminster Cathedral in 2011. Dan Hannan, the Tory MEP for the south east of England who agrees with Ukip that Britain should leave the EU, was his best man. Douglas Carswell, whose defection to Ukip at the end of August prompted Reckless to abandon ship, was an usher.

One wedding guest told the Guardian: “This byelection really shows the civil war on the right that is being played out with Mark. A good proportion of his wedding guests are now on opposing sides, though Mark does of course have his usher on his side.”

Tory MPs, who have been ordered to make at least three trips to Rochester, are baffled to find themselves in hostile territory as they walk past antiques shops and secondhand bookshops on the narrow high street to sign in at their campaign office. “Rochester is such a lovely place. When you walk round here, with all the spires and gates and history of Charles Dickens, it has a Trollopian feel,” one MP said, referring to the Victorian novelist Anthony Trollope who chronicled the political life of the imaginary cathedral town of Barchester. The MP added: “You think how can we possibly lose?”

But then the MPs reflect on the tumultous history of Rochester, where the authority of one king (Henry III) was challenged by Simon de Montfort while the authority of another (Charles II) was restored. After leafleting the leafy area around Restoration House, where King Charles II stayed on the eve of the restoration of the monarchy in 1660, one Tory MP reflected on the rebellion of 2014, which is centred across the River Medway in the more deprived Strood area of the constituency.

The MP said: “Rochester is only one part of the constituency. There is Strood which is the Benefits Street of the south east. They are really angry over there. They are ready to punish us.”

As Reckless canvassed in Strood in the shadow of the town’s new £26m academy school, he found a warm reception from natural Labour supporters who ensured that the constituency, known as Medway, was held by Labour from 1997-2010. “I’m supporting Ukip – immigration has become a joke,” the lifelong Labour supporter Damien Broomhall said as the Ukip caravan swept through his area.

The breadth of support for Ukip gives Reckless the space to wrong-foot the Tory candidate Kelly Tolhurst at hustings meetings as she sticks rigidly to a six-point plan that begins, predictably, with a pledge to deliver “action, not just talk, on immigration”. In a sign of the Tories’ lack of confidence in the face of the Ukip surge, Tolhurst, a local businesswoman and councillor, is taking a harsher position on immigration, which allows Reckless to adopt a more moderate tone.

In testy exchanges at the Medway Messenger hustings at the town’s Corn Exchange, Reckless condemned Britain’s “harsh and inhumane” immigration laws, which have prevented a local Sikh medical student from marrying the woman he loved from India because he was not earning at least £18,500 a year. When Tolhurst suggested that access to social housing in Medway should be denied to people who have not lived in the area for at least five years, Reckless accused her of discriminating against people from across the Medway border as much as people from the EU.

“We need rules so that people living in this area, in Medway, have access first of all to our social housing – absolutely,” Tolhurst shot back.

Reckless disputes the claim of his former Tory colleagues that Rochester is playing host to a civil war on the right. As he canvassed deprived wards in Strood, he told the Guardian: “The analysis that puts this down to a battle on the right doesn’t help here. The vote that is coming over to me from Labour has quite robust views on immigration, probably not very keen on Europe and not generally well off.

“There are traditional Labour voters who have swung quite a bit. A fair amount probably went for Margaret Thatcher then quite a lot went to Blair and in 2010 there was a very big swing across north Kent to the Conservatives as people gave the benefit of the doubt to David Cameron. They now feel very let down and that David Cameron and the people around him are not the party for them or have not kept their promises because immigration is back up to the level it was under Labour. A lot of that vote has moved solidly to Ukip.”

The Tories have not given up and are hoping that the Ukip support will prove soft as what they call “traditional Guardian-reading Labour supporters” vote tactically to prevent a Ukip win. Tracey Crouch told the Guardian: “This byelection is really competitive, we are getting some incredibly negative feedback about Ukip. There is a body of people, your traditional Guardian-reading Labour supporters who commute to London for a professional job, who are petrified of having Ukip on their doorstep.”

Crouch says Tolhurst has qualities Reckless will never match. “Kelly and I are both Leos, redheads and feisty. God help Medway and God help parliament is all I say.”