On last Thursday’s season premiere of the A&E drama “Gangland Undercover,” ATF informant Charles Falco — played by actor Damon Runyan — was living in witness protection, working as a mechanic, and frustrated with his rootless life. It’s a feeling the real Charles Falco knows well.

The 45-year-old spent a year in the program in 2007-08 after infiltrating a deadly biker gang in Southern California.

“You lose your identity and sense of self-worth,” he told The Post. “It’s starting over. Your Social Security Card is 6 months old — how do you explain that to people? You have no job references. If you have an education, you can’t take that with you. It’s lonely, too.”

Falco (an assumed name) was undercover in the Vagos motorcycle gang in Victorville, Calif., from 2003 to 2006. After a stint in witness protection, he returned to life as an informant infiltrating two gangs in Virginia, the Mongols and the Outlaws, in 2008. His story — first told in a 2013 memoir — is the inspiration for “Gangland Undercover.”

‘You have to play a human chess game. You have to try to win them over.’

Before spying on the bad guys, Falco was one himself, making up to $100,000 per month manufacturing and dealing methamphetamine. When his house got raided in 2001, he made a deal to cooperate with the ATF to avoid a 22-year prison sentence. To infiltrate the biker gangs, he had to start from scratch, frequenting bars where members were known to hang out and relying on his street knowledge to chat them up.

“You have to play a human chess game. You have to try to win them over. I almost look at it like dating,” Falco said. “You become a hang-around. You have to show that you’re there to back them up.”

Falco worked his way up the Vagos ranks, eventually becoming sergeant-at-arms, the club’s second-in-command; later, he was the Outlaws’ vice president. He had to carry guns, deal drugs, throw punches and survey rival biker gangs. While his deal forbade him from killing anyone, there were situations in which he thought he might have to — either to prevent the death of someone else or to escape if his cover was blown. The whole time, he hid a recorder — often in a jockstrap — to catch members admitting to criminal acts, and endured several close calls during a strip search or interrogation.

“It’s very stressful. Externally, you’ve got to look calm. Internally, you’re freaked the f - - k out,” he said. “You try to stay in a pissed-off mode. When you’re pissed you’re not scared.”

Falco’s informant work helped lead to 62 arrests over his three missions, but it came with physical and emotional costs. He served two months in jail for assault, including six days in solitary confinement to protect his cover. He crashed his motorcycle, landing him in the hospital with a fractured neck and severely torn shoulder. When he was in witness protection, he fell in love with a woman he met at church; they married and had a son, who is now 7. She knew about Falco’s past life, but hated it, and they recently split after nearly six years of marriage.

“It’s a lot of stress on somebody that hasn’t grown up like that,” he said. “I wouldn’t talk about it. You really have to be a loner to do this kind of stuff.”

Now, in addition to doing gang-specific investigative training at law-enforcement conferences around the country, Falco also works a corporate day job. He has joint custody of his son. Neither his work nor his child are aware of his double life.

“No one knows who I am on the outside,” he said. “I don’t get to live in my fame at all.”