To say that these men paid their shillings to watch 22 hirelings kick a ball is merely to say that… Hamlet is so much paper and ink. For a shilling, Bruddersford United AFC offered you Conflict and Art… and what is more, it turned you into a member of a new community, all brothers together for an hour and a half. Not only had you escaped from the clanking machinery of this lesser life, from work, wages, rent, doles, sick pay… but you had escaped with most of your neighbours, with half the town, and there you were cheering together, thumping one another on the shoulders, swopping judgments like lords of the earth, having pushed your way through a turnstile into another and altogether more splendid kind of life, hurtling with Conflict and yet passionate and beautiful in its Art.”

From The Good Companions by JB Priestley, 1929

JB Priestley’s description of supporters going to the match is perhaps the most famous passage of writing about football there is. A lyrical evocation of the fellowship and pride offered by the game to the industrial working classes of early 20th-century Britain, it used to be one of the few badges of distinction available to Huddersfield Town Association Football Club.

The fictional Bruddersford United is generally understood to be an amalgam of Huddersfield Town and the two Bradford teams, City and Park Avenue. Priestley was writing when Huddersfield were one of the giants of the emerging English game, winning the Football League three times in a row, and when the town itself was a powerful, prosperous citadel in the woollen district of Yorkshire’s West Riding.

Together with the city of Leeds and neighbouring towns such as Dewsbury, Batley, Ossett and Wakefield, Huddersfield exported woollen and worsted products. If Britain was the workshop of the world, the town was one of its most productive workers. But all that was 100 or so years ago.

Huddersfield and the Colne Valley were a crucible of industry, reform and political conflict that shaped the century

More recently, the football club and the community it represents have known decades of hard times. Huddersfield has endured a painful post-industrial hangover, as the manufacturing in which it specialised migrated elsewhere in the global economy. The club has scraped a living in the lower leagues, even falling into administration in 2003, when players went unpaid for five months. So the promotion last season of Huddersfield Town to the Premier League, the richest league in the global sport, came as a complete surprise to a population that prides itself on gritty realism.

Operating on the fourth-smallest budget in the second tier of the English game, the club relied on journeymen players, loanees from more glamorous clubs and an unsung German manager named David Wagner. Tipped for relegation at the beginning of the season, Town finished fifth. Last May, by winning a penalty shootout after a nerve-jangling play-off final at Wembley, they were, remarkably, promoted. Their fixture list this season will include the fabled football names of Liverpool, Manchester United and Chelsea.

In these boom times for televised sport, the value of an achievement such as Huddersfield’s tends to be measured out in millions of pounds. The play-off final between Town and Reading was worth as much as £290m to the winners; such are the rewards on offer in a league with one of the biggest television audiences in the world. Even if the worst were to happen and Huddersfield are relegated, they would receive “parachute” payments amounting to £85m. But Huddersfield this summer is experiencing a sudden joyfulness that has a deeper source than this windfall. In a town that has always celebrated its identity through its football club, as Priestley suggested in high sentimental prose, the team’s herculean efforts have generated a new sense of civic ambition and self-esteem.

Huddersfield Town celebrate victory in their Premier League promotion play-off against Reading in May. Photograph: Kieran McManus/Rex/Shutterstock

“Before, no one was interested in Huddersfield,” says Jim Chisem, the secretary of the Huddersfield Town Supporters Association. “Now, everyone’s interested. And this is a town with a rich and radical history, from the Luddites, who fought in our valleys in the early 19th century, to the first revolutionary Socialist MP ever elected to parliament [Victor Grayson, who was elected MP for the Colne Valley in 1907]. We’ve even provided the new Doctor Who. Jodie Whittaker comes from Skelmanthorpe!”

St George’s Square, the historic focal point of Huddersfield, is presided over by a statue of the local boy and former prime minister Harold Wilson. Behind him, the railway station, once described by John Betjeman as the most splendid in England, boasts a beautiful neoclassical facade. Here, earlier this summer, on the day that Town’s new kits for the Premier League season were unveiled, three huge replica shirts were hanging from its porticos with a huge banner that read simply: “We are Premier League.”

The contemporary inhabitants of Huddersfield have a daunting heritage to live up to. About a mile or so west of the site of the old Cloth Hall, built in 1766 to accommodate the booming textile trade, Chris Marsden leads the way through an extraordinary array of gothic, baroque and neoclassical Victorian villas. This is the suburb of Edgerton, where mill owners, wool merchants and bankers once jostled for architectural prominence and created an elite society, upwind from the smoke and dirt of the town below.

Marsden is the chair of the Huddersfield Civic Society, which has just published The Villas of Edgerton, a compelling guide to the pretensions, ambitions and social mores of Huddersfield’s Victorian elite. With loving attention to detail, it takes the reader through the area’s select avenues, charting the history of mansions such as the Grange, an imposing gothic pile built by the German wool merchant Joseph Lowenthal, or the spired tower of Stoneleigh, built by the cigar-maker Edward Beaumont.

Trevor Whitehead, left, and Jim Chisem, chair and secretary of the Huddersfield Town Supporters Association at their cabin by the team’s Kirklees Stadium. Photograph: Jon Super/Observer New Review

The privileges of this gilded world of wealthy manufacturers were challenged at the beginning of the 20th century by the emergent Labour party, which has its roots in the social struggles that were beginning to convulse the Pennines. Lowenthal’s daughter, Bertha, became a well-known suffragette. The Liverpool-born local MP for Colne Valley, Victor Grayson (known locally as “Our Victor”), briefly became the most famous socialist in the land in the first decade of the 20th century. The local socialists championed collective ownership of the mills and the right of women to vote. Edgerton resisted and for a while Huddersfield and the neighbouring Colne Valley became a crucible of industry, reform and political conflict that would shape the century to come.

Edgerton is now a remarkable period piece, with more than 90 listed mansions. “The exceptional thing about it,” says Marsden, “is its survival. Unlike Victoria Park in Manchester or Adel in Leeds, Edgerton survived intact.” By contrast, modern Huddersfield’s economic identity is fragile and insecure. Unemployment in the region has fallen to just below 5%, but most of the stable working-class trades and satellite industries that supported the mills have long gone, largely replaced by poorly paid work in the service sector. The continuing failure to electrify the TransPennine railway and a perceived lack of regional investment have led to a growing sense of neglect. According to GP Hester Dunlop: “There is a feeling that, materially, people and the town are losing ground.”

The university has become a crucial player in the town’s future and one that consciously strives to deliver a golden thread of continuity. “Its origins are in the old Mechanics’ Institute from the 1880s and the adult education institutes,” points out Marsden. “And now it’s trying to pioneer 21st-century techniques in textile design and areas such as nanotechnology.”

Architecturally, a good fist has been made of suggesting a seamless transition between past and present. The sites of the old vocational institutes, along with disused mill buildings and the town’s reopened narrow canal, have been adapted and absorbed into the campus. And the future looks bright. This summer, the university was awarded a gold star in the National Teaching Excellence Framework and is a major town employer with 2,000 staff and 22,000 students, a significant number of whom come from abroad.

The plan is to invest £200m over the next 10 years. But in the volatile world of mass-market higher education, it is likely that the current boom will be followed by bust for some institutions. That carries plenty of risks for a relatively unfashionable place such as Huddersfield.

Chris Marsden, chair of Huddersfield Civic Society, and grandson Noah Fox, a member of Huddersfield Town’s under-10s team, at Kirklees Stadium. Photograph: Gary Calton/The Observer

For the rest, as Britain’s manufacturing industry went to the wall, Huddersfield was largely left to find its own solutions. It is still seeking a new formula for prosperity, like other cotton and wool towns scattered across the Pennines. When great swathes of Yorkshire and Lancashire voted to leave the European Union last year, it was in part a protest at perceived indifference to the fate of places that had once been the proud generators of the country’s wealth. In the Kirklees district, which includes Huddersfield, the vote was 55%/45% in favour of Leave. Some local businesses, such as Taylor & Lodge, exporters of worsted fabric, still bear testimony to the great textile days, while valiant independent enterprises such as the Northern Tea House in King Street appear to be flourishing.

But in the town centre, there are also the usual telltale signs of commercial decline – the vacant units, the pound shops and the pawnbrokers. “Look at the George Hotel in St George’s Square,” says Chisem sadly. “Beautiful, but still shut down. There was supposed to be a buyer but there’s nothing happening. A lot of northern towns have been gutted like this.”

Chisem comes from nearby Meltham, a tiny town in the Holme Valley that used to thrive around the tractor factory. “Virtually everyone in the village used to work there. My grandfather did and my mother. Now there’s just a big Morrisons. So we’ve gone from high-skilled, well-paid work to low-skilled, poorly paid work.” After doing a master’s degree, he now works in the Currys store in town and does a bit of gardening on the side. “I have applied for so many jobs, but not got anywhere.”

The Brexit campaign, preoccupied with issues of identity, also licensed the re-emergence among some locals of a latent xenophobia, according to Binnie Joshi Barr, a Huddersfield Town season ticket-holder who runs a fish-and-chip shop in the town. Around 15% of Greater Huddersfield’s population is British Asian, mainly as a result of a recruitment drive in the textile industry in the 1960s. Barr’s father came to join his dad, who was working as a chef in the mid-1970s. “Brexit changed things a bit,” she says. “It became OK in some people’s minds to be racist. Not just towards Asians, but towards Poles and other Europeans who have come here. I remember on one occasion a guy came into the fish-and-chip shop, took a look at me and walked out.

If we can take advantage of this opportunity, well… but it’s a big if. We need the right sort of economic development

“That actually happened. The irony is, if all the Asians went, and the Poles, there wouldn’t be enough people to run the hospital and the shops.”

There are signs, though, that this summer of sporting anticipation has helped galvanise the town to fight for its identity in more positive ways. Huddersfield has always been close-knit, far enough from Manchester and the Leeds/Bradford conurbation to safeguard a distinct identity.

Controversial proposals to cut services offered by Huddersfield Royal Infirmary (HRI), transferring A&E and maternity services to Halifax, have been with met with consternation and demonstrations. Characteristically, the players, colours and supporters of Huddersfield Town have played a leading role in the campaign to save the HRI.

Dotted around the town, in pubs, shops and cafes, 900 posters feature 12 famous sons or daughters of the Huddersfield area, all relating an “HRI Love Story”. Among others, Patrick Stewart, Jodie Whittaker and the poet Simon Armitage are photographed, alongside text recalling the times when their families relied on the hospital.

Olivia Hemingway, the local photographer behind the project, would not describe herself as a football aficionado, although she enjoys the game. Hemingway works from Bates Mill, a former spinning mill that now acts as a creative hub for the town, offering exhibition space and studios. As she tried to give voice to a community indignant at the treatment of one of its heartbeat institutions, she found you couldn’t keep “Town”’ out of it.

“I arranged to photograph Patrick Stewart last April at the Sportsman pub, quite near Huddersfield’s stadium,” says Hemingway. “It was convenient because he’s a committed Town fan and he was heading to the match afterwards. He was incredibly nervous because it was vital they won if they were to get promoted. I ended up feeling nervous too, because I wanted him to have a good time!”

Huddersfield beat Norwich City 3-0 that spring evening, taking a crucial step towards the glory that even fans such as Stewart thought was beyond them. But before he left the pub, Stewart gave the photographer a handy tip. “He said, ‘You should photograph Andy Booth.’” Booth was a rough-and-ready centre-forward who retired in 2009 after starring in Huddersfield’s forward line for almost a decade. He remains one of the most loved players in Town’s history and is now a club ambassador.

Hemingway photographed him on one of the park pitches where he learned the game, which happens to be very close to the hospital. Booth’s “HRI love story” recalls how, at the age of six, he was limping badly due to a severe problem with his knees. The doctors, Booth writes, helped one of the great players of Town’s history “to have a football career”.

The wider “Hands-Off HRI” campaign has mounted demonstrations outside council chambers and in the town centre. Adopting the light-blue and white colours of Town, it recorded a major victory last month, when, after a fraught meeting at the town hall, the closure proposals were referred to the health secretary, Jeremy Hunt, for consultation in the autumn.

Dunlop, a Manchester City supporter, observes: “It’s no coincidence that ‘Hands off HRI’ has a blue-and-white colour scheme; active supporters wore these colours at every event.”

A lover of Huddersfield’s present as well as its past, Marsden is well aware of the possibilities offered by last season’s renaissance of the club that J Hilton Crowther, an Edgerton resident, helped found in 1908.

“Huddersfield has so much to recommend it,” he says. “We want it to be flourishing and we want it to be thriving. The anonymity is going to be mitigated by the team playing in the Premier League. If we can take advantage of this opportunity, well… But it’s a big if. We need the right sort of economic development to take advantage of Town’s Premier League status”. Above all, he suggests, “development needs to be people-centred. We don’t want offices or car parks or just retail, which would do nothing for the town centre.”

An influx of investment as a result of global publicity generated by the football will surely come, not least in the form of more foreign students. A Radisson Park Inn is already in the works to boost Huddersfield’s tiny hotel capacity, and there has even been talk of a cable car to transport supporters the mile or so down the hill from the town centre to the football ground.

Since Town’s promotion, curious inquiries are already coming from around the world. “Now 20% of traffic to our website is from outside the UK,” says Huddersfield Town’s marketing director, David Threlfall-Sykes. “It used to be no more than 5%. Huddersfield is back on the map.”

Marsden, a local chronicler who has studied the rise and fall of power brokers, potentates and politicians in industrial West Yorkshire, is keen to sound a note of caution: “There is an enormous potential dividend here. But we don’t want to be another Blackpool.”

In 2010, the Lancashire seaside town’s football club made its own unexpected rise to the Premier League, only to be relegated after one season. The team subsequently suffered a vertiginous fall through the leagues.

“In Blackpool, they will have imagined all that hotel capacity taken up in the wintertime, but look what happened,” says Marsden. “So there is a need to be cautious.” But Marsden cannot hide his excitement at “a chance for Huddersfield to develop a reputation again after all these years”.

For now at least, the larger questions of Huddersfield’s future can be put to one side. The season is about to begin.

“After the amazing year that’s just been,” says Barr, “it feels like everyone is part of this exclusive club. For the first time in my life, the town feels totally united.”

Barr first went to watch Huddersfield Town at their old Leeds Road ground in 1988, when she was six. “At that time,” she says, “I think there must have been maybe 15 Asian faces at most home matches. But I was born here and I don’t think it crossed my mind that this shouldn’t be for me. I went with family friends and bought a Huddersfield Town hat. What I mainly remember is all the men drinking.”

Having fallen in love with the game, when she was older she began to take her little sister Nutan along. They were both at May’s play-off final, when Town took 39,000 supporters to Wembley. And the makeup of the crowd was markedly different. “There were far more women and Asians.”

Season tickets for the coming season have gone up by £20 to £199 – the cheapest in the Premier League and £692 less than it costs to watch Arsenal for a year. All have been sold.

On the pitch, life is likely to resemble a repeated rematch between David and Goliath. Huddersfield’s wage bill last season was under £12m. They are now competing with teams such as Manchester City who this summer have already spent £220m on new players.

Jodie Whittaker, the new star of Doctor Who is from Skelmanthorpe, near Huddersfield. This image is part of local photographer Olivia Hemingway’s HRI Love Stories project, in support of the town’s hospital. Photograph: Olivia Hemingway

Much will depend on a man described by Chisem’s German grandmother as “our Jerry”. Since arriving at the club in 2015, when it was on the verge of relegation to the third tier of English football, David Wagner, formerly the reserve team coach at Borussia Dortmund, has transformed Huddersfield’s playing style. Most Town fans are now familiar with the concept of “Gegenpress”, or counter-press, which describes a high-energy, exhausting tactic of harrying the opposition into error. Unsurprisingly, the fans adore it, given the spectacular results it has achieved. But the style also captivates supporters because the approach corresponds perfectly to the town’s self-image, forged in its industrial heyday.

“Wagner is a clever guy,” says Chisem, “and he immediately understood that Huddersfield’s identity is as a hard-working, no-frills town. And he recognised the significance of the team’s Terriers nickname. He’s created a low-cost team that will give everything, even when the opposition is more talented, and the crowd has fallen in love with it.”

Will Gegenpress be enough to keep Huddersfield in the Premier League? It is a pity that JB Priestley is no longer around to find out. Last May, in St George’s Square, Harold Wilson looked on as more than 25,000 people congregated to celebrate Town’s promotion. Binnie Joshi Barr was there, naturally. So was Olivia Hemingway and her mum, neither of whom could be described as football fanatics. So was Jim Chisem, who most certainly is one. So was Chris Marsden and his grandson, Noah, who plays for Huddersfield Town’s under‑8s.

Like Priestley’s fictional supporters of Bruddersford United, they were there with half the town, “cheering together, thumping one another on the shoulders, and swopping judgments like lords of the earth”. For a place that, like so many others in the northern heartland of the Industrial Revolution, has not found life easy in recent decades, it was quite a moment. From next Saturday, there will be more to come, for both club and town.