Line of Duty might be completely fictional but many of the gripping storylines have actually been inspired by reality.
AC-12 doesn't actually exist but is based on similar anti-corruption branches operating across the country, while show creator Jed Mercurio has explained how he got some of his ideas.
The Met Police's own version of AC-12, which was first known as A10 in the 70s, is now called the Directorate of Professional Standards (DOS).
Because so little was known about the unit it was previously known as the 'ghost squad' before being renamed A10, then changing to CIB1, and later CIB2.
The shooting of an innocent man in real life inspired Mercurio to write the first series of Line of Duty - with the opening episode starting with a very similar incident involving Steve.
Many of the gripping plots have been inspired by twisted real-life crimes and actual miscarriages of justice, such as the murder of Stephen Lawrence and shooting of Jean Charles de Menezes.
Here is a look at some of the real-life crimes and tragedies which inspired Line of Duty plots.
Stefan Kiszko

Writer Jed Mercurio has stated that his series 4 storyline was inspired by the devastating real-life case of Stefan Kiszko.
Kiszko was wrongfully imprisoned for 16 years for the murder of schoolgirl Lesley Molseed while the killer walked free.
Describing his ordeal, former Conservative MP Anthony Beaumont-Dark said: "This must be the worst miscarriage of justice of all time. It brings shame on everyone involved in the case."
In the fictional Line of Duty storyline, murder suspect Michael Farmer, who has learning difficulties, struggled under questioning and was not properly supported by his solicitor.
DCI Roz Huntley, played by Thandie Newton, was put under intense pressure to charge Farmer because they needed a breakthrough in the case, despite a forensics expert suggesting he was not the culprit.
"Well, there are actually, really relevant examples in British legal history of Stefan Kiszko," said Mercurio when explaining what inspired some of his plots.
Like the fictional character of Farmer, Kiszko had learning difficulties and the mental and emotional age of a 12-year-old.
Kiszko was arrested after three girls claimed he had indecently exposed himself to them the day before the murder, but they later admitted they had lied for 'a laugh'.
Because this happened in 1975, prior to the Police and Criminal Evidence Act of 1984, Kiszko did not have the right to have a solicitor present during police interviews, was not asked if he wanted one and his request for his mother to be present was refused.
Kiszko confessed to killing Molseed but later said: "I started to tell these lies and they seemed to please them and the pressure was off as far as I was concerned. I thought if I admitted what I did to the police they would check out what I had said, find it untrue and would then let me go."
At Leeds Crown Court in July 1976 he was given a life sentence for murder and endured horrific physical attacks in prison.
The case was reopened after his mother launched an appeal and Kiszko was freed in 1992, but within 12 months he died from a heart attack aged 41.
An investigation cleared the police of misconduct and in 2007, DNA testing found the killer was Ronald Castree, who is now serving life behind bars.
Jimmy Savile

Jimmy Savile has actually been seen on a screen during multiple episodes of Line of Duty.
The British investigation into sexual abuse allegations after victims of Savile came forward has been directly addressed in Line of Duty.
During the third season, lawyer Gill Biggeloe actually asked Ted Hastings to hand over the files on his case to Operation Yewtree so they were out of AC-12s hands.
Before his death, the fictional Sergeant Danny Waldren wrote down a list of men who had sexually abused him as a child.
While not addressing him by name, they even showed a photo of Jimmy Saville shaking hands with a police officer.
During the current series, writers have expanded on the plot by stating that the fictional character of Gail Vella was investigating Savile's links with the police.
In the last episode, the fictional Vela said: "It’s now a matter of public record that Jimmy Savile cultivated relationships with senior police officers. Savile exploited those relationships to intimidate anyone attempting to investigate his offending.
"We now realise what Savile was getting out of those relationships with senior police officers, but what remains unknown, and uninvestigated, is what those officers were getting out of their relationship with Savile."
Stephen Lawrence

Stephen Lawrence was killed in a sickening unprovoked attack as he waited for a bus with his friend in 1993.
The budding 18-year-old architect was stabbed several times before he bled to death in Eltham, South East London, but despite tip offs, no one was charged.
Almost four years later, an inquest ruled the teenager had died in a racist attack by five white youths.
In July 1997, the Macpherson Report found the probe into his death faced “institutional racism and a failure of leadership”.
In 2012, David Norris and Gary Dobson were found guilty of Stephen’s murder and jailed for life. Two others have been jailed for drug dealing while one has remained free.
In the show, murder victim Lawrence Christopher was attacked by a group of white youths at a train station and was also an architect in training.
Jean Charles de Menezes

The very first Line of Duty scene was inspired by the killing of Jean Charles de Menezes.
In the show, Steve Arnott is working in the Counter Terrorism unit and orders a firearms team to raid the flat of a suspect.
However, they make a serious operational error by raiding flat 56 rather than 59, then mistake a baby harness for a bomb vest and shoot an innocent man dead.
Their Chief Inspector Phillip Osborne then demands the team lie in their reports and tells Arnott he is "finished" when he refuses to do so.
Line of Duty creator Mercurio has stated his storyline was influenced by the shooting of de Menezes in July 2005, which happened two weeks after the London 7/7 bombings.
The Brazilian man was shot in the head seven times after being wrongly deemed a terrorist.
The IPCC launched two investigations and in December 2008 an inquest returned an open verdict.
A jury rejected the police account of how de Menezes died and decided he was not lawfully killed as part of an anti-terrorist operation.
Daphne Caruana Galiela

Investigative journalist Caruana Galizia was killed after a powerful bomb blew up a car killing her in Bidnija, Malta, on October 16, 2017.
She refused to back down despite threats and in 2017 she was killed after a bomb was detonated in her car near her house.
Daphne was assassinated after breaking stories about government corruption, allegations of money laundering and organised crime in the country.
Three men were accused of the murder and one, Vincent Muscat, pleaded guilty and was jailed for 15 years.
Writer Jed Mercurio confirmed fictional character Gail Vella, who was shot dead while investigating police corruption, was based on the Maltese journalist.
Jill Dando

There are also many similarities between Gail Vella's death and that of Jill Dando, the TV presenter and journalist who was shot dead outside her home in April 1999.
In the show, AC-12 are currently investigating the murder of reporter Gail Vella in a case that also remains unresolved as it stands.
The suspect for the fictional Vella murder is Terry Boyle, who has Down's Syndrome and also appeared in the first series when criminals but a body in his freezer.
A search of his flat revealed pictures on his wall of Vella, who he described during questioning as a "nice lady", and he was described as a "local oddball" by Ted Hastings.
An early theory put forward by police investigating Dando's murder was that the culprit was an obsessed fan.
This led them to Barry George, who portrayed as an 'oddball' and was found to have a fascination with the BBC and celebrities as well as newspaper cuttings relating to Dando's death.
Former BBC home affairs correspondent Danny Shaw said: "Parts of the plot seem to draw on the Jill Dando murder and the subsequent arrest of an 'oddball' with a fascination for celebrities, firearms residue found, a hitman-style killing."
George was convicted of Dando's murder in 2011 but was acquitted after an appeal and retrial following eight years in prison. The case remains unsolved.
Line of Duty boss Mercurio said: "It’s interesting - and the other one is Barry George, who convicted and then acquitted of the Jill Dando murder. So, there are actually, really relevant correlates in the British system."
When coming under fire for using the term 'oddball' in the script, Mercurio pointed out it was not related to learning difficulties.
"The drama is using the term to refer to the Dando case, not to learning difficulties. We work with numerous police advisers," he explained.
Christopher Alder

Christopher Alder was a Falklands war hero who died in police custody in 1998 at the age of 37.
He was punched in a pub scuffle and cracked his head on the kerb, then Humberside Police took him to hospital before arresting him.
Officers were captured on footage mocking him and making monkey noises as he lay dying.
Five officers were tried for manslaughter and misconduct but were acquitted.
In 2004, four officers involved with the case were granted early retirement due to stress and were given payouts of more than £44,000 as well as police pensions.
This inspired the storyline in the current series where officers took a young architect into police custody and he died in his cell from an untreated skull fracture.
Chloe also revealed he being mocked by cops who jeered at him with monkey noises, in an uncanny similarity to Christopher.
Sir Cliff Richard

There was reference made to the BBC filming a police raid of an elderly pop star's home in episode 2 of this series.
Fans immediately linked it to the case of Sir Cliff Richard as old footage of one of Gail Vella's reports was played.
The character said: "Instead of pursuing the guilty police officers, your constabulary investigated celebrities and VIPs all without charge.
"Officers arguably colluded with the BBC in enabling a news helicopter to film the search of an elderly pop star’s home, again, without charge."
Police raided Sir Cliff’s Berkshire home in 2014, after false sexual assault claims. He was never arrested and the case was dropped two years later.
The BBC aired helicopter footage of the raid. Sir Cliff sued for invasion of privacy, winning £210,000 damages and £2million costs.
Real-life Ted

Much like the fictional Superintendent Ted Hastings in Line of Duty, one man made it his mission to rid the Metropolitan Police of all the bad apples.
Sir Robert Mark, who became the Met Police Commissioner in 1972, had a very similar mantra to Ted's "catching bent coppers".
"A good police force is one that catches more crooks than it employs," explained Sir Robert, who was the inspiration behind the Line of Duty hero.
In one of his very first acts, Sir Robert set up Britain’s first specialist anti-corruption police unit, A10 - the real-life version of Line of Duty's AC-12.
He pointed the finger at CID detectives, an elite group who were previously immune from accountability and scrutiny, which made him an unpopular figure.
"A bent detective not only himself is a wrongdoer, not only does he do irreparable harm to a body of men who little deserve to be discredited in that way, but he harms the whole fabric of public confidence and the confidence of the court and the police," he explained.
"As far as I’m concerned he will always be a prime target and he can look to no mercy at all from me."
Just like Ted, Robert wasn't there to make friends and told Met officers they were routinely corrupt and wouldn't be afraid to get rid of all of them.
When asked if it was a threat to put all CID officers back into uniform if necessary, he replied: "I don't regard that as a threat. I looked upon it as a managerial statement of fact."
They vigorously pursued the slightest lead and over a five year period, A10 and Sir Robert flushed out around 500 bent detectives.
Real police's reaction

Not everyone has been impressed by Line of Duty's explosive police corruption storylines.
Metropolitan Police commissioner Cressida Dick has been left "outraged" by the grand conspiracies inside the force.
"I was absolutely outraged by the level of casual and extreme corruption that was being portrayed as the way the police is in 2018–19. It’s so far from that," Britain's most senior police officer told Radio Times in 2019.
"The standards and the professionalism are so high."
While she did admit that the show made "good drama", she also criticised Mercurio's other BBC Drama, Bodyguard,
Although Dick did concede they might do the police some good, adding: "Both series actually make us look a bit cool and interesting – a net positive, probably.
"They bring in interest and applications. Even though it’s all completely ludicrous."
Police adviser

To make sure that the storylines are accurate to real-life, an actual police officer has been advising the show since the second series.
Known only 'John', the adviser has admitted Mercurio uses dramatic license but Line of Duty does stay within the realms of reality.
"Jed will always use dramatic licence, but there are very few places where he’ll push the boundaries of what policework is really like," John told The Independent.
"The job can be a lot more complex and time-consuming than we’re sometimes able to show in the series, but I’ve spoken to officers of various forces and ranks, and they recognise the fundamentals of day-to-day policing are there.”
"Most forces have several thousand employees and the drama focuses on a case involving two or three people.
Mercurio says he always goes to their advisers first before putting pen to paper so that everything checks out.
"The starting point is with our advisers and I always get excited if we can use something I haven’t seen in any other series," he told Radio Times.
"We’d be naïve to think there aren’t corrupt people working for the police, but they’re few and far between and the DPS do a really good job bringing them to task."
*Line of Duty airs Sundays on BBC One at 9pm