It’s mid-morning on a Thursday in Newport, South Wales and the music is already blaring in the Neon, an entertainment hub, when James Peterson bounds down the stairs.

A baby-faced handyman in a paint-splattered black tracksuit, Peterson is refurbishing some of the interior of the building, which stands out against shabby office blocks with its art-deco curvature and brick turrets. It’s a trade the Marx-reading 38-year-old may not be doing for much longer, because he is a rising star of the UK Independence Party.

In May, Peterson ran as the party’s Welsh Assembly candidate in Newport East, a constituency where Ukip previously attracted negligible support. He joined the party only three years ago but received over 20 per cent of the vote, coming second to his Labour rival. A month or so later, 56 per cent of voters in Newport voted to leave the EU, even though Labour is in power at all levels of government here.

In times past, Peterson might have stood for Labour. A father of four young boys, he grew up on a council estate in Newport, leaving school at 14 to make toffee apples for £25 a week, and later drove bobcats and other machinery at the Llanwern steelworks. His father, who was a union rep, worked at the plant for 30 years, and his eldest brother was employed there, too.

Generations of Petersons were staunch Labour supporters: James’s grandfather and great-grandfather were members. “My father would say that the Labour Party is for the working man,” he recalls, as we talk in a storeroom just off the auditorium. “So I’d go out, I’d go down the voting list, put Labour, cross X, but I wouldn’t know anything else.”

He voted Labour for 12 years before changing his mind. “When you look at the foundation of Labour, the people who formed it were within the working-class areas,” he says. “Working down the mines and drinking in the social clubs, their kids went to the same schools, they lived in the same street . . . If you wanted to talk to your MP, you would see them down the pub at the weekend. Now Labour have detached themselves from that accountability.”

Peterson began reading Marx as a young man, and agrees with much of the philosophy. He sees himself as “very left-wing”, and believes Ukip is the truly left-wing party. “They [Labour] are not thinking of the people who are claiming the benefits, who are facing the hardships. The Labour Party have left a [vacuum] and I think that’s where Ukip is growing.”

Peterson’s political journey is a familiar one in South Wales. Once a Labour heartland where some constituencies would weigh Labour votes rather than count them, the Valleys are now at the epicentre of Ukip’s surge.

In the 2015 election there was an 11.2 per cent swing to Ukip in Wales. Its five highest Welsh vote shares were in the south. In May it won seven Welsh Assembly seats, up from zero.

The Tories are also gaining; in their best performance in Wales for 32 years, they won 11 Westminster seats in May 2015, taking Gower and the Vale of Clwyd from Labour.

Roger Scully, a professor of political science at Cardiff University, has been analysing Wales’s shifting politics. “Clearly, memories of Thatcher have faded for a lot of people,” he says. “The Welsh Tories punched above their weight in contributing to Cameron's victory. They did much less well this year [in the Assembly elections], and I think that was primarily because of all the splits and problems with the party at a UK level.”

He believes “Labour should be very worried” in places such as Newport. “A lot of people who have been voting Ukip, in both England and Wales, are formerly part of the industrialised working class . . . They may have been tied to Labour through things like unions and upbringing, but still quite socially conservative.”

Almost everyone you meet from Newport over 30 has a link to the docks or steelworks. In the mid-19th century, Newport was Wales’s biggest coal-exporting port. As exports declined in the 20th century, so did the docks. Mass redundancies in the steelworks followed in the 1990s, with thousands of people laid off.

This trauma remains fresh in locals’ memories, even during casual chatter at the Queen’s Hotel, a pub in Newport city centre. Set back from the roar of the main road, it’s a short walk along sloping pebble-dashed terraces down from the station. There is a cosy hum inside, as middle-aged men and women stop and gossip at each other’s tables, and ferry drinks from the bar.

At around 9pm, Michael and “Sporty” (I’m only given his nickname) are having a midweek pint watching rugby in the pub’s back room. Both work in the pub industry, and were born and bred in Newport. Michael, 68, started work at 15 on the dock as a chain boy. He went on to work at a builders’ merchants, before entering the brewery trade as a drayman, delivering beer. He has since been a licensee for 22 years. His friend, Sporty, who is the same age, was an accountant at the steelworks for 14 years and left to enter the licence trade.

“When the steel industry went down, it killed all the pubs,” Michael tells me. “There used to be one on every corner. I suppose it killed all the communities. These used to be great places, now everyone’s on the dole. I put that down to Maggie Thatcher.”

He votes Labour, but believes Newport has been “let down” by politicians. “Cardiff’s a lovely big city with big buildings. We’ve got a little castle; they’ve got a big castle. Why are we a city?” he asks. “It means we have to accept more immigrants, which is a bit of a con, dumping them on us. We’re too small.”

Newport, which became a city 14 years ago, is more urban and diverse than nearby South Wales Valleys communities, and its migrant population doubled in ten years from 2001-11.

Sporty also believes there is too much inward migration here but, unlike Michael, he voted for Brexit. He is also less scathing about the Conservatives, who have struggled since Thatcher’s day to gain a foothold in these areas, so affected are they by the pit closures. “I bought my house for next to nothing thanks to her [Thatcher],” he says. “And I reckon Theresa May will be all right. She’s her own woman. Labour don’t know where they are.”

Pete, a thickset, shaven-headed cabbie who worked as a crane driver at the Llanwern steelworks for 20 years, agrees: “Theresa May’s OK; she’s got bollocks.”

His father and brother also drove cranes at the plant: “We all voted Labour every time, my father and grandfather, and before that, because it was through the trade union; that was the party of the working man. Now we all vote Ukip. Politicians say it’s not all about immigration, but it is. And I quite like that Nigel Farage – he’s not just a people pleaser like the others.”

Does Pete still see a taboo in voting Tory here? “No, no, no,” he replies. “I was quite shocked at Thatcher’s funeral – young people rioting when they don’t know what they’re talking about. We lived through her era. And right or wrong, she had more balls than the rest of them put together. Now, politicians just tell you what you want to hear.”

He was made redundant in 2001, when steelmaking ceased at the site and over a thousand jobs were lost. “If they said I could have my job back tomorrow, I’d drop everything and take it. It wasn’t like work – sometimes you’d laugh all shift,” he smiles. “You were all close friends. All that went when it closed. You lost touch with the boys.”

Peterson – who was a teenager working for a contractor at the steelworks when it closed – was on a low wage anyway, so he willingly moved into the care sector for similar pay. But the more established workers, including his brother, found it tougher.

“[Governments] are expecting people to have a lower lifestyle for less money and more work,” Peterson says. “People have pride and say they won’t lower themselves – and then comes unemployment.”

Loss of pride and money in these communities is coupled with a vanishing social life. There is only a handful of working men’s clubs left in Newport; they used to be the main social hubs. The Clarence Sports & Social Club is a gleaming white, three-storey building, nestled between a service station and a neat row of semi-detached houses. It is across the River Usk – mainly slimy banks at this time – from the city centre.

“I remember when it was boom time,” Christine Saunders, 62, the club’s secretary and stewardess tells me from behind the bar. “With the coal and steel, and workers from the docks. It’s very different now. It’s a bit of a ghost town, really.”

It’s not a busy evening for her – ten punters mill around, playing pool and watching sports highlights on a screen in the corner. Members’ fees pay for the Clarence, which was set up in the early 20th century by a local employer to serve as a place where its manual workers could enjoy their leisure time. “You’d walk in and know everyone,” Christine’s son, Richard, adds. He has been working in this trade since he left school at 15. “Your working life wasn’t just in the workplace.”

This erosion of such a tight-knit community is perhaps even more of a cause for dissatisfaction and nostalgia in Newport than the lack of jobs to match redundant workers’ skills.

Ceri Thompson, a 63-year-old retired coal miner who now works as a curator at the Big Pit National Coal Museum in Blaenavon, north of Newport, sees this social shift as one reason why some of his comrades are turning to Ukip. “You’ve got people who are very socialist, very left-wing, voting for Ukip,” laments Thompson, a Plaid Cymru supporter. “You look around here now and people actually dislike the Labour Party.”

Peterson, who feels his blue-collar roots are a great electoral asset, hopes that trend continues. “I’ve got my eye on council elections next year,” he says, grinning, before heading back to his paint job.