LOS ANGELES — Sacha Baron Cohen has brought so many outlandish characters to life that it’s easy to forget he has a serious side. He gets to show that part of himself in the Netflix series “The Spy,” based on the true story of Eli Cohen.

It’s the story of an average citizen who’s recruited to become an Israeli spy. Cohen worked undercover from 1961 to 1965 in Syria, where he developed close relationships with the political and military hierarchy. He became so driven by the need to help his country that there became a point where he lost control of his double identity.

Baron Cohen found taking on the role to be daunting.

“There is a family — his wife and his children — who survived him, and you want to create a good bit of drama, but you also want to do something that’s respectful to their relative’s memory,” Baron Cohen says. “I wanted to understand this man who was ready to sacrifice his life because of a belief. I was drawn to the concept of a deputy accountant in a supermarket who ends up going undercover as a multimillionaire businessman.

“The story is so incredible, it’s almost unbelievable.”

As a Mossad agent, Cohen got so close to ambitious military leaders and their rich friends he eventually became the chief adviser to the minister of defense. His life as a spy was short-lived, but the intelligence he gathered before his arrest was a key to Israel’s success in the Six-Day War in 1967.

Baron Cohen, who was born in west London to Jewish parents, was aware of the agent’s story long before he was offered the role because of a book his father purchased years ago. When Baron Cohen was offered the role, he read the book and found the story to be fascinating.

“It was a role that resonated with me and obviously with my late father,” Baron Cohen says.

Baron Cohen had been offered the opportunity to play Cohen in the past, but all the previous projects were feature films. He found the story so complex that it could only be played out properly through multiple episodes.

“He must have had an ability to charm and win people’s trust,” Baron Cohen says. “I know from having a career where I go undercover — where I only spend a maximum of seven to 10 hours in the company of someone — that if you have any kinks in your armor or any tells, then someone realizes who you pretend to be. Eli had to keep this character going for years without ever having any tells.”

The one thing Baron Cohen didn’t want to do was to play Cohen like so many fictional spies who tend to be emotionless, ruthless and void of any interest in relationships. He found Cohen to be a deeply emotional person with family ties, and he’s certain those aspects will make it easier for the audience to connect with him.

Baron Cohen goes into the dramatic role carrying the baggage of his memorable and outlandish work.

He’s banking on the audience remembering his work in serious projects such as “Les Misérables” and “Hugo” but recognizes there’s a real possibility some are going to think this is another comedy.

There were several conversations between Baron Cohen and Emmy winner Gideon Raff (“Homeland”), who wrote and directed “The Spy,” in regards to how Baron Cohen’s past would affect taking on a deadly serious project.

Raff had always thought of Baron Cohen for the role but became convinced when they met to talk. “The minute he started talking about these two characters in one and how he connected to the script, I knew there was no one else to play the role,” he says.

“We decided that it would be so amazing for the audience to see Sacha for the first time. To get to see him in a dramatic role that lets you see him in all his emotional and dramatic and high-stake situations but not with any of larger-than-life characters. It would be him, almost naked, in front of the camera.

“The Spy” begins streaming on Netflix on Friday.