It is a wet Saturday morning in September, the kind when the prickling heat of August feels a distant memory. In Regent’s Park in London, a man in a black shirt, shorts and socks jogs over to a group of parents watching their 14-year-olds warm up in the drizzle. He’s clutching two small flags, each in fluorescent yellow and orange. “I need two linesmen,” he says. Technically, he should say “assistant referees”, but we all know what he means.

I step forward. A few days earlier, I had met one of Britain’s leading assistant referees – whose decisions have seen him jeered from the stands and mocked in the House of Commons. This might give me an inkling of what his job entails.

I try to remember what he told me: when one team is attacking my half, I don’t watch the ball; I look across the pitch, along the line of the last defender, to see if any attacking player is about to run offside. I sprint up and down the touchline, level with that last defender, but also look up and down my own touchline to see if the ball is going out of play. And I have to keep an eye on the progress of the game generally, to see if there’s anything I need to signal to the referee.

I’m looking in three directions at once, while sprinting. So rather than staying behind the touchline, I’m zigzagging on and off the pitch. At least there are only a couple of dozen people watching, and no one’s throwing bottles.

As I run past the attacking team’s substitutes, I hear one moan: “This is the worse lino I’ve ever seen.” I flag an attacker offside and the coach shouts as I run past: “He has to be offside when the ball is played, not when he gets the ball!”

I know, I say, and he was.

“You’re supposed to be in line!”

I know, I say, and I was.

“You’re not even a proper linesman.”

I know, I say, and I’m only doing it so your sons can have a game, so maybe stop giving me shit, eh? Especially as your lot are already winning 5-0.

Things are not helped when one of the defending team shouts, “Well done, lino, great call!” – largely because he’s my son.

The drizzle descends. I get wetter and wetter. The longer the game goes on, the more I pray for it to end. It’s hard, really hard. And I’m not even the referee.

***

Referees have long been the most reviled people in football. From children’s matches, where under-8s re-enact the cheating of the professional game, to the Premier League, where tens of thousands of people gather to sing, to the tune of Blue Moon, “Shit ref / You’re just another shit ref”, to be a match official is to be, in the vernacular of football, “the bastard in the black”. And yet the UK has thousands of them, paid a pittance to get shouted at by hungover parents, or picked apart on social media, or found wanting by TV pundits. They turn out in rain, snow or sun, with none of the glory you get from playing. What is it like to spend your weekends travelling to out-of-the-way grounds to referee a game only 125 people care about? Why get out of bed on a Sunday morning to keep order among 22 blokes who smell of last night’s beer?

Coach turned ref Abdulkadir Arshe. Photograph: Benjamin Quinton/The Guardian

If today’s levels of online abuse can seem disproportionate, it was ever thus. In Yorkshire, they still curse the name of Ray Tinkler, the referee who in April 1971 allowed West Bromwich Albion to score a goal Leeds United believed cost them the league title; fans – not hooligans, but irate middle-aged men in raincoats – invaded the pitch. It didn’t matter that Tinkler’s decision was right. In January 2000, a snarling pack of Manchester United players led by Roy Keane surrounded Andy D’Urso after he awarded Middlesbrough a penalty at Old Trafford. In March 2005, Swedish referee Anders Frisk retired early when his family received death threats after José Mourinho, then Chelsea’s manager, accused him of favouring Barcelona in a Champions League game. And in May this year, a match between two London amateur teams ended with the referee being chased around the pitch, knocked down and kicked by players and spectators. Just days ago, a linesman in a game between Rangers and Livingston had his head cut open by an object thrown from the crowd.

Raging at the ref back in 1971

Douglas Ross sits at the intersection of Britain’s two most hated jobs: he is a match day official and a politician. In May this year, the Conservative MP for Moray and FA-certified linesman delighted fans on both sides of the stadium when he fell flat on his face during the Scottish Cup final. In March, when he called for Celtic’s Jozo Simunovic to be sent off during a Rangers v Celtic game, Twitter lit up with accusations that Ross was not just a cheat, but a Unionist cheat.

It is a warm day when I meet Ross – just back in London after a summer spent touring his constituency and running the line in qualifying matches for European club tournaments – on the terrace of the Commons. Implausibly, somewhere nearby a bagpiper is playing.

Douglas Ross, Tory MP and FA-certified linesman. Photograph: Fabio De Paola/The Guardian

“I was on my way home and the observer rang,” says Ross, 35, remembering the aftermath of that Old Firm match. (Top-level referees and assistants are watched in every game.) “I thought: ‘This can’t be good – he said he’d phone tomorrow.’ But his wife had been on Facebook and seen all the stuff about me, so he wanted to warn me. I did stay off social media for a while.”

But just as the public rage was dying down, it was stirred up again in parliament by Ian Blackford, the SNP’s leader in Westminster. “The game was on the Sunday. On the Tuesday, we had the spring statement and he stood up and said, ‘We all saw the honourable member for Moray waving his flag furiously at Ibrox, getting a Celtic player red carded. Well, maybe he should take the red card out and show it to the chancellor of the exchequer because his statement is so terrible.’

“He thought that was a funny remark. I thought it was a cheap gag. What it did was reignite all those people on social media who had just calmed down after 48 hours of having a go at me. Sometimes my opponents don’t realise the implications.”

***

Why do referees do it? Because they love football, of course. Sometimes it’s also because they weren’t good enough as players: “One of my old managers told me I’d be a good referee,” remembers Premier League referee Chris Kavanagh, “which was his way of saying my playing days were over.” Sometimes it’s because they want to see a different side of the game: Abdulkadir Arshe, the ref who got me running the line in Regent’s Park, was a youth team coach – he remembers with horror telling referees they didn’t know what they were doing – and took the FA course after reffing a few casual games. Sometimes it’s a way of prolonging the experience of being at the top of football: 38-year-old Cheryl Foster played 63 times for Wales, more than any other female player, and spent nine years with Liverpool. When she retired from playing, she wanted to stay in the game and is now on the Fifa list, eligible to referee the biggest matches in the women’s game; in August she became the first woman to take charge of a men’s Welsh Premier League game. The rest of the time, she’s a PE teacher and deputy head; school will take priority until the October half-term.

Manchester United players led by Roy Keane rage at ref Andy D’Urso. Photograph: Sportsphoto

“As a player, you think you know quite a lot about the game,” she says. “And you do. But as a referee you learn lots more little things. Mainly positioning. As a striker I stayed in one part of the pitch, whereas a referee has to be like a box-to-box midfielder. I do more fitness work now than when I was a player – in the last five weeks I’ve been fitness tested five times.” As a Fifa referee, she is sent stringent targets and a training programme (“which I follow religiously”).

She passed her test in December 2013 and the next month was an assistant referee in the men’s Welsh National League – a demanding start. “It was the physical nature I noticed,” she says. In women’s football, “the ball is played and passed a lot more”; male players clattered into whoever was in possession.

Foster referees the way she would have wanted to be refereed. “I talk to players as much as I can and explain decisions. If I haven’t seen something, I’ll say so, calmly. I even smile. I don’t want to seem unapproachable – I’ve been on the receiving end, especially from male referees. You’d ask a question and get a hand gesture – ‘Stay away, I’m not talking.’ It adds to the frustration.”

The first steps into refereeing can be terrifying. First, there’s the prospect of having to manage people. Second, the sense of responsibility – that a mistake can sway the destiny of a game. Third, the simple fear of retribution. At Ross’s first game – an under-13s match – he let play go ahead despite the pitch being dangerously frozen, then forgot what he had learned and baffled players by giving rugby signals. Ryan Atkin, 33, who referees at National League level (one step below the Football League), forgot to bring his whistle to his first match in a Devon league. “The first half of the game was reffed with me using my voice,” he says. “My grandfather found me a whistle for the second half.

Cheryl Foster, who played 63 times for Wales, oversees a Welsh Premier League match. Photograph: Gareth Iwan Jones/The Guardian

“Until you’re experienced, it’s scary,” Atkin says of those first few times in charge. “That’s especially true in parks football, which can be very lonely. You’re often on your own, potentially managing 30 players and coaches, who might not appreciate what you’re doing and the number of decisions you make.”

Ross says a lot of officials are lost at this level, “because they get so much abuse from their very first game. These are people just starting out, but because of the reaction of some coaches and parents, they just walk away.”

In the parks, there are things you can’t prepare for. Ashley Hickson-Lovence qualified as a referee at 16, and after a bad tackle in a south London league game two years later, found the teams confronting each other not with the usual pushing and shoving – what commentators call “handbags” – but with knives. “Someone was stabbed in the face. It went into the car park. I ran for cover and called the police, who got there in four minutes. I had to downplay that to my family – my mum had never been keen on me refereeing.” Reflecting on the fight now, Hickson-Lovence has a very refereeish reaction: “I think I learned a lesson.” That it’s worth checking how well-armed teams are? “That I was too inclined to let games flow.” If he’d clamped down on the tackles, he thinks, no one would have felt the need for knives. Nine years later he is still refereeing, and writing a PhD on the early life of the English ref Uriah Rennie.

I'll watch borderline calls 100 times on TV. Not only have you affected a match, but the pundits will tear you to shreds

There are 28,000 FA-qualified referees in England (Wales, Scotland and Northern Ireland have their own football associations), overseeing every FA-recognised game of football in the country, from Premier to kids in the park. In England, you take a 34-hour course, mixing classroom and on-pitch learning, to become a level seven referee, taking charge of amateur games. If you are good, your local FA and league administrators will notice you and you’ll get promoted. By level four, you’ll referee semi-professional leagues, controlling games in front of paying crowds – small crowds, but crowds nonetheless, who feel they have a right to let you know what they think. At level one, you referee in the Premier and Football Leagues, and your mistakes will be featured on TV and the sports pages. At all levels, you will get insulted on Twitter.

On average, between 4,000 and 5,500 new referees qualify each year, paying about £160 to take the course. With 28,000 in total, you don’t need a maths degree to work out most of these new recruits don’t last the distance. But the FA’s senior referee officer, Farai Hallam, says the number of working referees is “healthy”. Every county FA has its own development officer to offer advice, and all new referees get a mentor. The FA is trying to change the face of refereeing, he says, recruiting more women and people from ethnic minorities. “Football evolves,” he says, “and refereeing has to evolve as well.”

Ref Anders Frisk retired early after his family received death threats following this game between Chelsea and Barcelona. Photograph: Action Images

In that context, Ryan Atkin’s decision to come out last year, becoming the English game’s first openly gay referee, was a big deal. The announcement was coordinated between him, the FA, Stonewall, Sky Sports and Professional Match Game Officials Ltd (the company responsible for officials). “We discussed why I was doing it, and they couldn’t have been more supportive. We’ve seen an encouraging increase in people in sport coming forward since then. I think in the next couple of years the game will become more inclusive.”

***

You might expect the top levels of the game to be the hardest to run: there is so much more at stake; the crowds are vast; the scrutiny is intense. But the roar of a stadium full of people can be too loud for any individual insult to matter. “The crowd is just background noise in the Premier League,” Kavanagh says. “We’re so focused on talking to each other” – officials wear earpieces and microphones – “and working as a team, we only pick up a little.”

Top-class officials stay in a hotel together before the match, travel together to and from the stadium (imposed after a referee driving home from a West Ham game was accosted by angry fans at traffic lights) and often work in the same groups. In fact, the camaraderie is one of the things referees love about the game. Down in the local park, there’s none of that support.

But the bigger difference comes in the standard of play. Top-level teams are not interested in anything that gets in the way of winning, and moaning at the ref isn’t a priority, regardless of what TV pictures suggest. This is not always the case lower down the leagues, particularly where amateur and semi-professional football merges. There also tend to be just enough people watching – maybe 50 or 60 – to make everything they say to the officials very audible, and potentially hurtful.

This is where officials get the worst abuse, Ross says. “I’ve sent lower-league players off for calling me a cheat. That’s the worst thing you can say, questioning an official’s integrity. Yes, we’ll get things wrong, and some officials might be incompetent, but we never go out there and think that if we do such and such, a team will win.”

***

All referees have their own style. Some are martinets; some allow players as much leeway as possible. What unites them is horror at their own mistakes. “It makes you feel sick,” Atkin says. He mentions a game where he got a couple of huge decisions wrong. “I can’t watch that clip,” he says. “You feel angry at yourself, embarrassed. There’s the fear of going back to the club in a couple of months and having to walk in and smile. You want to talk about it – but you don’t want to remind them you made that decision.”

The clip ref Ryan Atkin can’t watch

I ask what the game was. Atkin says he’s so ashamed, he has wiped the teams’ names from his mind. “But if you go on YouTube and search ‘Ryan Atkin referee’ it’s there.” I do. It’s Staines Town v Welling United in 2013, and he’s right, his decisions are horrible: a scything tackle is ignored; a striker who’s blatantly pushed over gets booked for diving.

Ross says he obsesses about every borderline call. “I’ll watch them 100 times on TV – my wife gets so fed up with it. I can’t sleep on a Saturday night if I think I’ve got something wrong. Not only have you affected a match, but all your colleagues will see it and the press and pundits will tear you to shreds.”

Yet the vast majority of decisions in every match are correct: at the very top of the game, barely one in a hundred will be wrong. When an official does make a mistake, the Premier League referees will discuss it at their fortnightly seminars and work out how to avoid repeating it.

It’s the same down the leagues. But while the official close to the incident is better placed than the bloke 90 yards away with half an eye on his phone, still the officials get the blame for almost everything. “Sometimes players don’t want to work with you,” Atkin says. “The challenges fly in, but you’re the one getting flak for not controlling the game. Well, what have I done to make you tackle like that? With those games, you can’t wait for the 90 minutes to end.”

Still, every official I speak to stresses how much they enjoy it. They talk of how fit it makes them (Arshe, who referees six games every weekend, says he averages 30,000 steps every match day), of the satisfaction of getting through difficult games and the bond that develops between officials. They walk on to the pitch together, and off the pitch together, always with their heads held high – even on those occasions when they need a police escort.

***

After what seems like an eternity, my 80 minutes running the line in Regent’s Park are over. My son’s team lost 8-1. I am cold and wet and cringing at the memory of completely misreading one situation, raising my flag to a player who was miles onside. “I’m sorry!” I shouted. “I got that wrong.” The players, less than a third my age, roll their eyes in disgust. They turn to the referee: “He admitted he got that wrong!” one of them shouts. “Come on, ref!”

At the end of the game, I’m left out of the handshakes. No one says, “Thanks for the game, lino”, not even my own son.

That afternoon, I go to Loftus Road to watch QPR play Norwich. I sit in my usual seat in the front row of the West Paddock, within easy shouting distance of the assistant referee. Around me come the usual shouts. “Oi, lino, help your fucking mate out, will you? He’s shit.” “Oi, lino, your hair get in your eyes? How come you didn’t see that?” “Oi, lino, don’t you know the fucking rules?”

I sit in silence. There’s no way I’m ever criticising a referee again. At least, not until the next time.

• Commenting on this piece? If you would like your comment to be considered for inclusion on Weekend magazine’s letters page in print, please email weekend@theguardian.com, including your name and address (not for publication).