RETIRED Detective Chief Inspector Nanette Pollock is nibbling a Danish pastry in her douce East Renfrewshire home and talking about the day she had her nether regions branded as part of a bizarre initiation rite carried out on female officers.

"When you arrived in CID, they would put you over a desk, lift up your skirt and use the office stamp on your buttocks," she says with a horrified laugh. "Looking back, you can't believe that sort of thing went on, but it was all done in a jovial way and in those days you just accepted it. Other officers would ask: 'Have you had your bum stamped yet?' Once you'd been through it, you felt you were part of the team."

Pollock joined the City of Glasgow Police in 1972, three years before the Sex Discrimination Act came into force, and found herself in a testosterone-filled environment. Her first encounter with sexism came before she had so much as filled in an application form. "I was 26 and looking for a challenge,” the 72-year-old tells me. "I saw a poster up in the recruitment office and I went in to find a male police officer sitting with his feet up on the desk. He said: 'What do you want, hen?'

"I said: 'I am interested in joining the police.'

"'Wait a minute, here,' he replied. 'Am I missing something? Does it say we're looking fir wummin?'”

Five minutes in the company of Pollock, whose ebullience has not been tempered by a forthcoming cataracts operation, is enough to suspect the rebuff would have ricocheted off her steel plating. She ignored the rudeness of the man, and many others, and pressed ahead with her plans. "To be honest, I had no idea what a man's world I was entering,” she says. “At each stage of the application process it was men I was dealing with, but I thought: 'Somewhere along the line there will be women; I'm just not meeting them.'

"Then, when I started the initial training at Oxford Street, Glasgow, it was 35 men and me. I asked an instructor: 'Where are the other women recruits?' He said: 'What other women?'”

Pollock's reminiscences have been prompted by a three part-documentary, The Force: the Story of Scotland's Police, starting on BBC One on Monday. She is one of several former officers, including John Carnochan, co-founder of the Scottish Violence Reduction Unit, author Karen Campbell and her parents Carina and Eric Webb, who have been interviewed about their experiences. Their reflections are interwoven with footage of officers out on the job today.

The peg for the series, made by STV Productions, was the 400th anniversary of a 1617 Act of the Parliament of Scotland which created the country's first ever constables – two per parish – to aid Justices of the Peace. It also acknowledges the fact Scotland pioneered formal policing; the Glasgow Police Act led to the establishment of Britain's first proper force in 1800 when Robert Peel was just 12 years old.

While the programme was in development, however, events conspired to make it even more timely. The ongoing crisis around Police Scotland, whose chief constable Phil Gormley is at the centre of bullying allegations, has put the service under intense scrutiny; with so much criticism swirling around the organisation, it seems right the focus should be shifted back to the work of frontline officers.

At the same time, the Harvey Weinstein allegations have prompted an examination of the collective conscience when it comes to the treatment of women in the workplace. By tapping into the memories of older officers, The Force gives a powerful insight into the macho culture that was endemic in the Police Service in the 1970s and 80s.

The contemporary footage shows how much has changed in the interim: today, women officers work as equals alongside the men; they wear the same hi-vis jackets, carry the same weapons and take part in the same drugs raids.

For almost 200 years after the appointment of the first quasi-constables in 1617, Scotland was policed in a fairly haphazard way; in 1776, however, the American Revolution effectively ended the tobacco trade, plunging the Glasgow economy into crisis, and crime began to rise.

It was clear the city required a more structured approach to law and order. But early attempts to form a police force ended in failure as funds and enthusiasm dwindled.

Eventually, in 1800, during a brief lull in the Napoleonic Wars, the Act was passed. "It was sold to taxpayers as part of a package," says Alastair Dinsmore, a former inspector who now runs Glasgow Police Museum.

"It provided for the paving of the streets, the lighting of the streets, the cleaning of the streets and the policing of the streets – everything that is required for a decent environment." And so the first force – comprising a master of police, nine constables and 68 watchmen stationed in sentry boxes, came into being. By day and night, the constables would patrol the city, their ears cocked for the sound of a watchman's rattle alerting them to a street robbery or pub brawl.

Their efforts proved so successful, crime quickly shifted to outlying areas, such as the Gorbals and the Calton, which went on to form forces of their own. By the time the Met in London was established in 1829, there were 18 across Scotland and the north of England.

Back then, the idea of a female officer would have been greeted with derision. As with so many professions, it took two world wars to shift attitudes and persuade the establishment that women might have a role to play.

Glasgow's first paid female officer, appointed in 1915, was Emily Miller, a member of the city's Vigilance Association, a branch of the suffrage movement, with more joining up in 1918; in those days the women had badges and armlets, but no uniforms and no power of arrest.

After the Second World War, the number of female officers grew more rapidly; yet by 1970, there were still only 382 across Scotland (less than four per cent of the total).

Aficionados of police-based dramas – from Z Cars to Life on Mars – will be unsurprised to hear police forces were not in the vanguard of the fight for gender equality. And yet some of the stories the female police officers tell, of small slights and major setbacks, shed new light on the scale of the discrimination they faced.

By the time Pollock joined, men and women trained together at the Scottish Police College in Tulliallan, but once they had qualified, female officers were assigned to a separate policewomen's department and expected to perform “female-friendly” tasks.

"A lot the time we were like nannies," says Pollock. "It was all lost children, found children, bad children and if mothers were arrested for shoplifting – guess where their children would be sent? The irony was that the male police officers who were handing these kiddies over were mostly married with families, whereas we were mostly single and had no idea what to do with them."

Turnbull Street police station, where Pollock was based, was near the mortuary, so she would be sent to support grieving parents or to accompany female defendants from the High Court to Gateside Prison in Greenock.

Female officers were also asked to direct the traffic on London Road and the Gallowgate where lorry drivers would get their kicks from knocking off their hats as they passed. "You would be standing there like a fool, with your hat rolling about the road and you couldn't stop the traffic to go and retrieve it,” Pollock remembers.

While in the rest of the UK the rule requiring female officers to remain single was scrapped in 1946, in Scotland it remained in place until 1968. So, while Eric Webb spent 33 years in the force, Carina, his wife, served only three. "I knew when I got engaged I would be leaving the police and I did think: 'I could have had a good career there, but I don't get the opportunity,'” she says in the documentary. “I thought it was rather short-sighted to put everybody through training and then it's: 'Bye now, you're getting married.'"

By the time of Pollock's wedding, things had changed, but women still had to seek permission, and their prospective husbands would be investigated to ensure they had no criminal links.

The policewomen's department disappeared with the equality legislation in 1975, but the discrimination did not. Female officers' uniforms were often impractical – Karen Campbell talks about her astonishment when she discovered she was to carry a handbag – and they were not as well-protected. "You got a baton and various other things; all I got was a whistle,” Carina says to Eric. “What would I do with a whistle?”

"Blow?" Eric replies, with a mischievous glint.

After Pollock joined the CID and rose through the ranks, spending time in the drug squad and complaints and discipline, she continued to attract a degree of resentment, particularly during those brief spells when she was back in uniform.

Arriving in Paisley as a newly-promoted sergeant she became aware of low-level grumbling from officers who swore they'd never let her sign their notebooks. “There was one man, in particular, so I made a point of going out to sign his notebook early on.” Did he put up a fight? “He was like a lamb,” she chuckles. “It was all talk.”

Though Pollock earned the respect of most of her colleagues, there was always someone on hand to undermine her achievement. "I remember when I was promoted to DCI, one of the officers asked: 'Who are you sleeping with?'"

Almost inevitably, such entrenched prejudices had an impact on the way certain crimes were dealt with. The first time John Carnochan attended a domestic abuse incident an older officer told him: "Just remember son, what happens between a man and a woman in their own home has nothing to do with us."

But it was the way prostitutes were treated – like they had forfeited the right to protection – that distressed Pollock most; and she made it her mission to do something about it.

Her anger was rooted in an incident that happened while she was still at the policewomen's department. “I was walking back to the station after a night shift and decided to cut through the back lanes," she says. "Suddenly, my eye was caught by what looked like a black plastic bag and it was moving. I thought, 'Oh, no – a dying dog' and I went over to look, but it was a prostitute in a cheap raincoat lying in the gutter.

"What a mess she was. She had been given a doing by a punter the night before. At some point, a traffic car had passed and the two officers inside had said: 'You're a slag – what do you expect?'

"There were plenty back then who would use use words like 'nymphomaniac' or 'slapper'. As if any woman wants to stand on a street corner on a horrible, wet, windy, cold night with a skirt half way up her backside to attract a dirty stranger who is probably stinking of alcohol.”

Pollock continued to learn about the sex industry, popping in to the local drop-in centre and getting to know Glasgow's prostitutes personally so that by the time she came back to A Division (which covered the red light district) as DCI, she knew all the issues. “I knew about the children in care, the violent partners, the flashbacks," she says. “And I thought, when I got the job, maybe there will be a chance to change something here."

The catalyst was the murder of Margo Lafferty in 1998: the seventh Glasgow prostitute to have been killed in as many years. The reason Lafferty's death was so shocking to Pollock was that she was streetwise. "Margo was on heroin, but she could handle herself. She could beat up two men. If it could happen to someone as strong as her it could happen to anyone," she says.

Pollock led the inquiry which eventually saw Brian Donnelly convicted of Lafferty's murder; but she also spoke up about attitudes towards sex workers and helped found Routes Out of Prostitution, an organisation aimed at helping them to exit the industry. It was to be her greatest legacy.

In the last 200 years, the Police Service has changed beyond recognition. At the Police Museum, Dinsmore tells a story about a portable camera obscura set up during the Glasgow Fair in 1824. As one visitor was surveying the street scene on the screen, he spotted a thief picking a pocket and ran outside to arrest him. "When the accused went to court the next day, the magistrate said: 'Wouldn't it be good if we had these all over the city?'” But the earliest police officers could not have foreseen the developments that were to make their jobs easier: not the fingerprinting, not the mobile phones and certainly not the CCTV.

Even in Pollock's time, technology has revolutionised the way we fight crime. Donnelly 's conviction was made possible by advances in DNA testing just over a decade after it was first used to catch a serial killer in Leicestershire.

The status of women has risen too; today, they make up 30 per cent of Police Scotland's officers – still a way off gender parity, but a great improvement on 1970.

And yet, as The Force makes clear, in another sense the role of a police officer has hardly altered at all. They are still out there putting themselves in danger on a daily basis.

In episode one, some of the contributors are visibly upset as they remember the murder of two colleagues, Angus McKenzie and Edward Barnett, at a house in Allison Street in Govanhill in 1969. The killer, former police officer Howard Wilson, was part of a gang who had committed a bank robbery.

Later, we see the Rev Georgie Baxendale, chaplain to Police Scotland, addressing the annual Police Memorial Service for the 273 Scottish officers who have lost their lives in the line of duty since 1812.

“You who loved those you gather here to remember; you wanted above everything to keep them safe, but that was not the life they chose,” Baxendale says. “They were the risk-takers and problem-solvers of their generation.”

The Force: the Story of Scotland's Police starts on Monday at 9pm on BBC One