Published: 12:46, 09 January 2019
| Updated: 18:21, 09 January 2019
It was a trial that could have ruined his political career.
As Craig Mackinlay stood in the dock to hear a jury had found him not guilty of falsifying election expenses, he could have been forgiven for wondering just how it had come to this.
Three years after being elected the MP for South Thanet, he and two aides were in the dock facing criminal charges about Conservative party election expenses during the campaign.
Over 10 weeks, the trial lifted the lid on the extraordinary lengths taken by the Tory party to win the seat in a battle against then Ukip leader Nigel Farage.
It also revealed how the campaign led to simmering tensions within the local Conservative party and a fractious relationship with national party election chiefs.
A few days after Craig Mackinlay went on trial at Southwark Crown Court, the leading Brexiteer Jacob Rees-Mogg travelled to Thanet to fulfil a long-standing engagement to be a guest speaker at a constituency association dinner.
His appearance at the dinner was the kind of fund-raising event Conservative associations regularly hold.
But the presence of Rees-Mogg - coincidental though it was - provided the association with an opportunity to display its solidarity with their MP.
During the evening, Mr Rees-Mogg is said to have told guests their MP had been “treated appallingly” by Conservative Central Office.
The dinner may have served to lifted Craig Mackinlay’s spirits but there remained genuine concerns in the local party about the outcome and the consequences for the MP if found guilty.
It seemed a long way from the warm spring night in May 2015, when dozens of ballot boxes were delivered to Margate’s Winter Gardens.
The votes would determine far more than who would be the next MP for South Thanet.
The result - one way or another - would indirectly determine the future of a political party that had one central aim: to get the UK out of the EU.
Ukip, the party disdained by David Cameron as “fruitcakes” had become more than an irritant. Its leader had become a serious political player.
And it was Kent that had become something of a stronghold for the self-styled "People’s Party".
The party had scored a symbolic victory in the European election in 2014 and in the local elections in 2013, when the party came from nowhere to take 22 seats on the county council.
Then it made a stunning parliamentary breakthrough in 2014, when the former Conservative MP Mark Reckless defected to Ukip, triggered a by-election and won the Rochester and Strood seat.
No wonder alarm bells were ringing in the Conservative camp. Ukip had a momentum that appeared unstoppable.
Its supporters were energised by the prospect of its irrepressible leader Nigel Farage finally achieving what he had failed to on six other occasions and become an MP.
For the Conservatives, the threat of losing the seat was real. But the party also saw it as an opportunity to halt the rise of Ukip by defeating its leader - the political equivalent of chopping the head off the snake.
The trial revealed how the two parties went to extraordinary lengths in the fight for votes.
It was this battle that was to lead to a court case that revolved around one issue: had the Conservative party breached the legal limits on campaign spending and in doing so, gained an unfair advantage over their rivals?
As the campaign unfolded, however, it seemed Ukip was making the running.
On the ground in South Thanet, Farage held a never-ending number of public meetings in village halls and community centres, ramming home the message that the only way to get the UK out of the EU was to send him to Parliament.
Between January and May, he held 24 public meetings in the constituency,meetings at which he encouraged voters to join the “People's Army” and peppered his speeches with touchstone soundbites like “taking back control".
Confidence remained high. Nigel Farage publicly pledged to resign as leader if he did not win - a commitment that stiffened the Conservative party’s resolve to defeat him.
The local Conservative party had, in selecting Craig Mackinlay as its candidate, chosen someone who had been a member of Ukip and a brief spell as its leader.
It was hoped his strong scepticism over the EU might help arrest the leeching of Conservative supporters to Ukip.
But Ukip remained untroubled. It was continuing to poll well in opinion surveys. Nigel Farage continued on an unrelenting campaign surrounded by journalists and film crews, events punctuated by the inevitable regular breaks in pubs along the way.
In February, the party held its annual conference in Margate’s Winter Gardens, an event that further served to provide Farage with another platform for his campaign.
Things didn't always go to plan. In one serious setback, he was forced to expel the Ukip MEP Janice Atkinson, who was the party’s candidate in Folkestone and Hythe, after a tabloid expose over an alleged inflated an expenses bill for an event at the party’s Spring conference in Margate.
Despite such setbacks, the Conservatives still seemed on the backfoot. It began to realise their strategy would have to change.
Stephen Gilbert, a senior campaign director for the Conservatives, told the trial that the party realised it was facing a unique challenge.
The Conservative senior campaign team decided that if it was to take on and neutralise Ukip nationally, it would have to do so from South Thanet.
"It became clear that the whole Ukip effort was almost entirely going to focus on Nigel Farage," he said.
"Its strategy was completely different to any other party. We wanted to to be a spoke in the wheel of Ukip's campaign.”
If anything this decision flattered Ukip - it represented a tacit admission that they had a battle on their hands. But it was also the decision that directly led to it facing charges of breaking the law on spending limits.
The fight intensified in the weeks running up to polling day.
Conservative Central Office had despatched Marion Little, an experienced campaign manager, to co-ordinate the fight and installed an experienced press officer to handle the media.
Countless events were arranged for VIP visits by senior ministers, a strategy that did not always find favour with the local constituency team.
So many flooded into the area that they were oftenleft with little to do. There were moments which could have come from an episode of the TV parody The Thick Of It.
Even comedian Al Murray, who was standing as a candidate under the guise of his character the pub landlord, found it hard to satirise.
The then farming minister Liz Truss was prevailed upon to visit a farm and dig out a cauliflower which was then taken to a market. But en route, they realised they had nothing to dig it out with and made a detour to buy a knife.
There was an uneasy relationship between election agent Nathan Gray and Marion Little. Gray was regarded as out of his depth and the subject of unflattering emails read out in court.
In one, Mrs Little - who had in other e-mails said she was “marooned” in Thanet - described him as “an idiot.”
When asked in court how much training he had been given to do the job of election agent he said it was no more than about four hours.
Local constituency officials had already become concerned about the campaign costs.
As early as February, an email from association chairman Tony Salter to Marion Little said: “We are getting perilously close to hitting our legal limits both for the long and short campaigns. We face a real prospect of a legal challenge from Farage if we make the smallest slip up.”
There was a row over plans by Conservative Central Office to carry out an opinion poll at a cost of £7,200 - with a warning that “there is a real danger of going over the legal limit for the long campaign.”
Craig Mackinlay told the court that he was no more than a small cog in the machine of the Conservative’s campaign strategy.
The string of political VIP visits continued with virtually every cabinetmember and a string of junior ministers commanded to get down to help the cause.
A planned visit by Boris Johnson led to fears that it would cause “carnage” with an uncontrollable media scrum.
In an email concerning the visit, Marion Little told colleagues: “It is likely to be the usual carnage and I might need a gin and tonic tonight.”
The chaotic melee that followed was described as “an absolute circus.” Johnson was ambushed by Ukip supporters on the train travelling down from London and on a chaotic walkabout, stuck grimly to his script to talk up a pledge to “Regenerate Ramsgate.”
Despite the chaos, the Conservative election team regarded it as a success - largely on the back of the amount of media coverage.
George Osborne visited a few days later, dropping a heavy hint plan to ‘Regenerate Ramsgate’ would be a likely beneficiary of the government's next Coastal Communities fund.
A team of party strategists headed by Mrs Little used the Royal Harbour Hotel in Ramsgate for accommodation.
It became the unofficial campaign “hub” with Conservative Central Office advisers coming and going - the costs of which - and whether they had been correctly reported - were a central issue in the trial.
Dozens of volunteer activists dubbed the “South Thanet Soldiers” also descended, arriving in buses plastered with the Conservative logo. Perhaps anticipating future problems, they were warned that they needed to make sure they made clear they were supporting the Conservative party.
Labour, without the resources to compete with its rivals, struggled to make much headway.
Opinion polls suggested the two parties were neck and neck as polling day approached but Ukip remained optimistic.
It rounded off its campaign with a spirited rally in Broadstairs, culminating with a speech by Farage in which he described election day as “the most important in my political career.”
And it proved to be just that, only not in the way he had envisaged.
As the results from around the country came through it was not until 11am the next morning that the returning officer declared that Craig Mackinlay had won.
Even in defeat, it was Nigel Farage that the media pack were more interested in as they raced off to Walpole Bay to hear him announce that he was to stand down as leader of Ukip.
Characteristically he refused to be written off completely,leaving the door ajar to him standing again for leader at some point.
But since then, the party has seen its fortunes fade and the heady days when the “People’s Army” was causing political palpitations for the mainstream parties have gone.
For the Conservatives and Craig Mackinlay, it was a sweet victory, later soured by the expenses allegations.
Understandably relieved, the verdict closes a traumatic chapter for the MP.
Had the jury gone the other way, he might now be facing the humiliating prospect of resigning the seat he won in 2015.
More by this authorPaul Francis