To live in Tehran, writes British-Iranian journalist Ramita Navai in this collection of true stories, requires one essential skill: lying.

“Morals don’t come into it,” Navai writes. “Lying in Tehran is about survival . . . when the truth is shared in Tehran, it is an act of extreme trust or absolute desperation.”

“City of Lies” features eight sprawling tales (all names have been changed, as have certain details, and several characters are composites). Each focuses on an individual, but Navai uses these personal stories to observe how people live, love and survive in a society ruled by fundamentalists.

Iranian youth read “Harry Potter,” watch Hollywood films like “The Bling Ring,” smoke joints and listen to Metallica and Radiohead — all the while knowing that one misstep can ruin their reputations and lives, including the possibility of prison or death. For women, sex outside marriage could mean “up to 100 lashes.” If convicted of adultery, a woman could be executed.

Crystal meth, ‘dog sweat’ and divorce

“Somayeh” (each story is named after its central character) concerns a 17-year-old girl, her father, Haj Agha, and her mother, Fatemeh.

Somayeh and her classmates were virgins, but “a handful had experienced illicit encounters, mostly with their cousins, who were the only males they were allowed to be in contact with,” Navai writes.

When the conservative Somayeh met her 26-year-old cousin Amir-Ali, a well-built young man with a surgically perfected nose (according to Navai, plastic surgery is remarkably common in Tehran), the attraction was instant and mutual.

For the most part, Amir-Ali and his friends hung out with prostitutes and spent their weekends smoking pot and “sheesheh” — or crystal meth, the country’s most popular illegal drug after opium.

There were attempts at sex with regular girls as well, with varying degrees of success.

“Sometimes they would have ‘la-paee,’ ‘between the legs’ thigh sex, [where] he would pump vigorously between a girl’s clenched thighs,” writs Navai. “La-paee sex was the most popular form of sex among teenagers and girls in their early 20s from religious families.”

Occasionally, the boys would “get lucky,” but it was “nearly always anal sex so the girl’s hymen would remain untouched and she would still be a virgin for her wedding night.”

Navai says that marriage between cousins is “considered lucky and heaven-sent, a strengthening of families that brought unity.” Amir-Ali’s mother caught him looking at his cousin, pulled him aside, and warned him not to mess around with family unless he was serious. He said that he was, and a wedding was planned.

But Somayeh’s mother, Fatemeh, was dubious and sought the guidance of her favorite mullah for “Koranic divination.” Navai’s description of the business of professional advice-givers is reminiscent of our own psychic-hotline industry.

“There were cowboys out there, as there were in any business — turbaned charlatans riding on the wings of people’s misery and pain,” Navai writes. “These were the clerics who charged a fortune for their divination services. Some even offered magic spells at premium rates.”

But Fatemeh had a mullah she trusted — one who would actually spend time with her and didn’t charge, although he did accept gifts — and he neither blessed or trashed the union, saying only, “It depends on the purity of their hearts.”

In arranging the marriage, Somayeh made Amir-Ali promise to allow her to attend university. Soon after they married, Amir-Ali changed his mind.

After the first year of marriage, Amir-Ali “got bored.” He spent more time with his friends smoking sheesheh and drinking “dog sweat” — home-brewed vodka made of raisins. He suddenly had hot new Facebook friends, spent time at a gambling den and stopped coming home.

Along the way, Somayeh noticed that Amir-Ali, when he did return, had a combination-lock briefcase that seemed important to him. Eventually opening it, she found love letters from Amir-Ali to a mystery woman expressing sentiments of love and lust he’d never expressed to her, along with a box of condoms, photos of a chesty blonde and “half a dozen scratched DVDs in a Bambi sleeve.”

She played one of the DVDs and was repulsed when she saw “a woman on her knees being f—ed from behind.” This was her first exposure to porn, and it left her “sobbing and praying.”

She told her mother everything, and Fatemeh listened intently, as she had also had a recent experience with heartbreak.

While looking for some old paperwork, Fatemeh found Haj Agha’s passport and discovered that all of his supposed pilgrimage travels had actually been to Thailand. As she knew nothing about the country, she asked her favorite mullah, who informed her that, “Thailand is a country of prostitutes. All the women there are for sale.”

Fatemeh eventually forgave Haj Agha — the truth could have destroyed both of their reputations. Her daughter, however, was still young, and had a chance at a better future. While divorce had long been considered shameful, and even just recently would have been considered unthinkable by Fatemeh, several couples they knew had recently divorced.

“You must get a divorce,” she told Somayeh, telling her it was “the only way you can be happy.”

Fearing the ramifications of his own proclivities going public, Amir-Ali granted the divorce, and Somayeh received the sort of second chance many Iranian women never get.

‘I’d rather be stoned to death’

After leaving her cheating husband, “Leyla” sold her jewelry so she could rent a studio apartment. Her new neighbors, seeing this beautiful young woman living alone, whispered that she was “a whore and a husband-stealer.”

She moved in with her friend Parisa, who worked at a beauty salon that “offered sheesheh as a slimming aid,” and who soon revealed to Leyla that she also earned lots of money as a private dancer. She told Leyla she could get her similar work, lap-dancing for men at a birthday party.

There, they danced for middle-aged men, and Leyla watched as Parisa disappeared with one of them.

Soon after, Parisa was schooling Leyla on how to build a clientele as a prostitute.

None of this was as shocking as one might think.

“It is impossible to escape sex in Tehran. Everybody knows that the streets are full of working girls,” Navai writes. “Prostitutes are part of the landscape, blending in with everything else. Pornographic photos are Bluetoothed across the city.”

The Iranian regime tries to fight it all, with little success. In their desperation, Navai writes, “the Interior Ministry has suggested rounding the women up and taking them to a specially designated camp where they can be ‘reformed.’”

Leyla found herself working alongside students, blue-collar women with families and girls who just wanted money for designer clothes. She quickly learned the rules of the streets, including that you “do not get in a car with more than two men,” and that oral sex usually got you out of trouble with the police.

Sometimes, police tried to demand full sex in exchange for freedom. One girl told an officer who demanded such, “I’d rather be stoned to death than have to f– you, your wife must be a blind cripple.” She was sentenced to three months, and received ninety-two lashes.

Leyla’s good looks worked to her advantage. She was off the streets quickly, landing a high-level cleric who bought her “bright red crotchless knickers.”

In time, a software designer client begged her to make a sex tape. She agreed on several conditions, including that her face not be shown.

The film, shot in her house, turned out better than the client expected. He titled it “Tehran Nights” and gave copies to practically everyone he knew, including the man who sold him his porn.

The film became a hit, selling many copies for twice the price of DVDs of popular US hits like “Desperate Housewives” or “Lost.”

After seeing the DVD, her client’s friends wanted Leyla tapes of their own, and she happily obliged, charging $1,000 and up. While her face was never shown, “most connoisseurs of local porn soon recognized the round bottom, the soft girlie voice and the big full lips” as the star of “Tehran Nights” and later “Housewife from Shiraz.”

“Tehran Nights” also wound up in the possession of the Iranian cyber-police, who, in the face of the administration’s deep anti-porn feelings, were hungry for a high-profile conviction.

One night, after a relationship with a big money client went sour, Leyla decided to leave Iran, work for a time in Dubai — where Iranian girls made far more money — and save enough to move to America.

Sadly, she never put her plan into play.

The morning after making this fateful decision, the authorities came for her at 6 a.m.

The cyber-police unit, while watching the tape, noticed Leyla’s electricity meter in the corner of the screen, its serial number in full view. Leyla was identified within hours.

“The lies [people tell in Tehran] are, above all, a consequence of surviving in an oppressive regime,” Navai writes, “[and] of being ruled by a government that believes it should be able to interfere in even the most intimate affairs of its citizens.”