It emerged out of the mist like a “giant modernist cathedral” in the middle of the North Sea. Hundreds in Hartlepool stood transfixed as the world’s biggest ship, the Pioneering Spirit, sailed into the towns’s shipyard, carrying one of Britain’s biggest oil rigs.

In this yard the rig will be dismantled and recycled in one of the biggest decommissioning projects ever. It was, declared the front page of the town’s newspaper, “the dawn of the yard’s new era”.

For those lining the beach, the arrival of the London Eye-sized rig last Tuesday was not only a reminder of Hartlepool’s proud shipbuilding legacy. It was a vote of confidence for a town that has felt abandoned for decades.

“We’ve just had the world’s biggest ship in Hartlepool!” beamed Tim Robson, 56, over his privet hedge in Headland, one of Hartlepool’s most deprived neighbourhoods. “A lot of people here are so negative and inward-looking. We have an awful lot to offer: you wouldn’t get the biggest ship in the world coming to Hartlepool if we were useless.”

Hartlepool’s 70,000 voters are largely united in this pride in their hometown – if not much else. A Labour stronghold since 1964, the coastal town has been a sea of red for half a century. Perhaps no longer. Labour voters are leaving or dying, Ukip came second here in the 2015 general election, and most recently the once-unthinkable act of voting Tory is no longer implausible. The election of the Conservative Ben Houchen as Tees Valley metro mayor on Friday is the clearest sign yet that Labour’s hold on the wider region is crumbling.

Robson, whose maisonette has a view of the shipyards, is fairly representative. He has voted Labour all his life but now feels abandoned by the party, both locally and nationally. He complains about a reduction of police officers and a rise of crime on his street, and says he stopped voting for Labour because of Jeremy Corbyn’s policy on Trident. He worries about a third world war being sparked by the United States and North Korea. All of this will play into how he votes on 8 June.

Robson voted remain in the EU referendum – but will now vote Ukip as “the lesser of three evils”. He said: “I don’t like Jeremy Corbyn, I’m not keen on Theresa May because I think it will be more Thatcherism. I think Ukip will do less damage.” He said he would have voted for the Liberal Democrats “but they never put a candidate up here” (the party does have a Hartlepool candidate – but in 2015 she fared so poorly, she lost her deposit). Robson failed to convince friends, family and neighbours to keep Britain in the EU and now he fears for the future.

The overwhelming support for Brexit – at 69.6% the highest in the region – put most people at odds with their pro-EU MP Iain Wright. Wright is standing down after 13 years and many leave voters the Guardian spoke to said they wanted “England for England”, or a variation; others said they were simply sick of Labour. Most did not want to be named. “I know I’m going to get strung up for this, but I don’t think the majority of people in Hartlepool knew what they were voting for. It was primarily immigration and that’s what makes it so sad because we’re going to pay the price now,” said Robson.

A former exporter at the chemicals giant ICI, Robson was one of tens of thousands laid off during the painful decline of Teesside’s manufacturing industries. At its peak in the 1980s, Hartlepool had the highest unemployment rate in the country; today one in 10 people do not have a job, still double the national average.

It has led to deep-rooted pockets of deprivation all over the town. The statistics are stark. In one neighbourhood, Burbank, 61% of children live in poverty – compared with 31% in the town overall, the 14th highest level in the UK. Eleven of Hartlepool’s 17 wards are among Britain’s 5% most deprived areas. And when the chill winds of economic downturn blow, they are felt keenly in Hartlepool, where a third of all jobs are in the public sector.

Facebook Twitter Pinterest Difficult task: Labour’s Mike Hill canvassing in Hartlepool. Photograph: Gary Calton/The Observer

Those with long memories know just how far Hartlepool has come, though, and they believe it is turning a corner. John Mennear retired in 2014 after 33 years at Hartlepool borough council, where he ran community services, tourism and culture. When he started in 1981, two years into Margaret Thatcher’s premiership, he said “you almost felt guilty having a job because every week there was an industry closing. You wondered where it would end.”

He reels off a list of the town’s cultural offerings – the National Museum of the Royal Navy; the Museum of Hartlepool; Hartlepool Art Gallery; and HMS Trincomalee, the oldest warship still afloat in the UK. His point is that the town has attempted to overhaul its old industrial image and attract new visitors.

Hartlepool council, Mennear said, bucked a national trend by keeping museums open. But there are some who resent that while museums have stayed open, other key services have shut. There is bitter anger about the closure of A&E, critical care and part of maternity services at Hartlepool’s hospital; it is a 30-minute drive, or a 90-minute bus journey, to Stockton for people with serious injuries.

Perhaps fearing a backlash on the doorstep, Labour has chosen Mike Hill, a Unison regional organiser with a focus on health, to fight to retain the seat. He voted to remain but now says he embraces the Brexit result, in an admission that is likely to be seized upon by his political rivals.

Hill’s task is much harder than it used to be. Discontent has made Hartlepool fertile ground for Ukip, which came second by 3,024 votes in 2015 and took a handful of council seats from Labour. While Ukip had a disastrous day in local elections last week, in Hartlepool it only narrowly lost out on a seventh council seat to Labour, ending just 23 votes behind as the Conservatives ate into its support.

Jonathan Arnott, Ukip’s north-east MEP, conceded on Friday that the party had “underestimated” the Tories and would distribute leaflets across Hartlepool on Monday telling voters: “Vote Tory, get Jeremy Corbyn.” Ukip is terrified that its share of the pro-Brexit vote will be split with the Conservatives, giving neither party a majority and allowing Labour to keep the seat. Arnott said: “We’re going to have to say: ‘If you vote Conservative, that’s exactly what Jeremy Corbyn wants you to do.’ We have to be direct and blunt.”

Facebook Twitter Pinterest Jonathan Arnott, UKIP MEP Photograph: Gary Calton/The Observer

It is a risky tactic. A visit by the party leader, Paul Nuttall, was overshadowed when two women fought about Brexit during a mini-Ukip rally outside a pub in Headland a week ago. And there are many who fear the next five weeks will reopen the wounds of last summer. “Because people feel so disenfranchised they’re busting for a fight and it can get heated,” said Alex Muller-Nicholson, 33, who runs art workshops for children.

A Labour voter, Muller-Nicholson said she was a proud Hartlepudlian and did not want to be seen to be talking the town down. Hartlepool is often called “the country’s biggest village, everyone knows everyone in some way”.

Facebook Twitter Pinterest Alex Muller-Nicholson: ‘You want to be proud of where you live - and I am.’ Photograph: Gary Calton/The Observer

But, she said, she worries hugely about the town’s future without radical change. It has enormous potential, she pointed out: an underused shoreline that could be transformed into a home for marine biology; a picturesque marina full of bars, restaurants and new-build apartments; and a well of untapped homegrown talent, people that want to start businesses but feel they must move away to do so.

Back in the shipyard, 50 workers are dismantling the oil rig, whose Eiffel Tower-like spire dominates the skyline. Its new home in Hartlepool is Europe’s strongest quayside, built by the Teesside decommissioning firm Able UK to cash in on the boom in stripping down the North Sea’s oil rigs. It might once have been a pioneer in shipbuilding, but now Hartlepool hopes for an alternative future.

Muller-Nicholson hopes her town will break out of what she calls an inward-looking “time-warp”.

“To break this insular mentality we need people from outside to breathe in a bit of – not even multi-culturalism, other-culturalism,” she said. “You want to be proud of where you live – and I am for some reasons. But it could be so much more.”

Facebook Twitter Pinterest The Brent Delta Oil platform is docked at the Able dock ready for dismantling. Photograph: Gary Calton/The Observer

Main photograph Gary Calton for the Guardian