Earlier this year, a Brazilian tourist was wandering around Ischia, a picturesque volcanic island just off the coast of Naples in southern Italy. She was retracing the steps of Elena Greco and Lila Cerullo, the characters at the centre of the four-book series by Elena Ferrante that begins with My Brilliant Friend. Perhaps she was thinking of the scenes in the first novel, where Elena leaves home for a few blissful weeks of reading and swimming; perhaps of the more dramatic romantic entanglements that happen on the island in the second volume.

One evening, the tourist stopped at a local restaurant for dinner, and, to her surprise, found Elena Greco eating there, along with railroad worker and poet Donato Sarratore and his family. Or, at least, the actors playing these roles in the forthcoming television adaptation of the first novel. “It was very funny – she recognised every one of them,” says Saverio Costanzo, director of the series. “She told us that many, many people from South America are going around Naples to see places from Elena Ferrante.” In the past few years, thousands of tourists have visited the area because of the book series, a double bildungsroman about a pair of friends which spans the decades between their 50s childhood and the present day. A thriving industry has sprung up to meet demand: Ferrante tours ranging from half a day to six days take people around the book’s locations, promising an authentic Neapolitan experience.

Here are the familiar sights from the books: the grate where the girls throw their dolls, the Carracci grocery store…

But today the Naples that so ignited readers’ imaginations lies a little further afield. A 45-minute drive from the city, hidden down an unassuming but well guarded driveway, is a set of tall, dusky apartment blocks. In these streets, drying washing hangs from the balconies, and street vendors sell milk bottles, mismatched pots and pans, and ragged-looking clothes. The location is a former glass factory, disused since the 80s, which over the past year has been meticulously transformed into the “rione”, or neighbourhood, that provides the main setting for Ferrante’s four novels.

It is June 2018 when I visit the set of the much anticipated TV series, joint produced by the companies Wildside and Fandango. Filming is in progress; we are frequently silenced to avoid interrupting scenes. Extras with dour expressions and austere period costume eye us suspiciously as they chainsmoke, looking as if they have come to life from a black-and-white postwar film. Here are the familiar sights from the books: the tunnel under which the girls pass on an ill-fated trip to the sea, the grate where they throw their dolls, the Carracci grocery store. Inside the tobacconist’s, fresh prosciutto legs have been taken out of the fridge, and are displayed alongside 50s newspapers.

The scale of the project is staggering. It is one of the largest sets in Europe, spreading over two hectares. An enormous warehouse contains recreations of several characters’ apartments; all windows, doors and furniture are period originals. The casting process took eight months; more than 9,000 people from the area auditioned. The eight-episode series – an HBO, Rai Fiction and TIMvision co-production – is the first foray into foreign-language television for HBO (not only is it in Italian, but large parts of the dialogue are in 50s Neapolitan dialect, which most Italians will need subtitles to undertand). Lila’s wedding dress and the pair of shoes she secretly makes for her father’s shop have been designed by Pierpaolo Piccioli, the creative director of Valentino. This is a prestige Italian production, assembling the great and the good of the country’s cinema and TV; one of the press officers, I am later told, is married to celebrated director Paolo Sorrentino.

Pulling all this together is Costanzo, a 43-year-old director from Rome with a handful of fairly well received feature films under his belt. His history with Ferrante goes back to 2007, when he wrote to ask whether he could adapt her short novel The Lost Daughter – which prefigures many of the themes and characters of the My Brilliant Friend series – for the screen. He worked on a screenplay for six months, but in the end the project didn’t work out: Ferrante had been disappointed with previous adaptations of her work and wanted nothing more to do with cinema. And then, silence – until, last year, he got a call. He was told Ferrante had put his name forward for the TV adaptation of the books, and he had got the job. “Maybe Elena Ferrante is my mother,” he jokes. Sharply dressed, though he looks a little tired at the end of a long day of filming, he answers questions thoughtfully and with authority. He’s easy and natural around the young lead actors; it’s clear they have spent a lot of time together and there’s a sense of mutual trust.

Costanzo had been wary of adapting novels for the screen – over-fastidious fan reactions to his 2010 film of the Italian bestseller The Solitude of Prime Numbers had put him off – but in this case, it felt right. “I was in love with the book,” he tells me. “I had read it a long time before that phone call. I was very familiar with the work of Ferrante, the way she understands writing, dramaturgy, her characters. So I jumped in.”

He speaks admiringly of how the book is “very psychological, never hypocritical. It goes for the truth. It doesn’t compromise, ever.” Until My Brilliant Friend, he continues, Ferrante was writing vertical tragedies, going deep into human emotions, but with this work she made an epic, horizontal tragedy, matching the depth of feeling with the breadth of storytelling.

Director Saverio Costanzo, centre, on set with the cast and crew of My Brilliant Friend. Photograph: Eduardo Castaldo

Expectations for the series are high. Originally published between 2011 and 2014, the novels quickly became a global phenomenon, acclaimed both by critics – Michiko Kakutani, writing in the New York Times, praised “the visceral immediacy of Ms Ferrante’s novels: their ability to capture, with passion and precision, the intensity of her heroines’ inner lives” – and the public (the books have sold 10m copies in 40 countries). A 2017 documentary, Ferrante Fever, interviewed famous fans including Jonathan Franzen, Pulitzer prizewinner Elizabeth Strout and Roberto Saviano. Michelle Obama is an admirer, as is Hillary Clinton, who says the books are “just hypnotic… I read the first one, I could not stop reading it or stop thinking about it.”

Costanzo believes that the series owes its success to Ferrante’s ability to lay bare universal emotions. “It’s a story that somehow belongs to everyone. I found myself, even though I’m a man, in Elena’s and Lila’s shoes. It’s like a mirror – you can reflect yourself in that story. This is a kind of miracle, that happens very rarely. It’s not easy to make it happen.” The emotions are not, for the most part, pleasant ones: Elena (Greco, the narrator) flits from jealousy to shame, attraction to revulsion, ambition to self-loathing. One of the things Ferrante was firm about including in the TV show was the same beginning as in the book, because, says Costanzo, “then we understand that [the protagonist] is writing the book for revenge. There is anger in the pages she is writing. Inside the revenge there is love, there is hate, there is everything.”

In 2013, James Wood wrote in the New Yorker: “[Ferrante’s] novels are intensely, violently personal, and because of this they seem to dangle bristling key chains of confession before the unsuspecting reader.” It is no wonder, considering the emotional rawness of the books, that Ferrante has decided to remain anonymous, protecting both herself and those around her from public scrutiny (others writing with similar clarity and self-excoriation, such as Karl Ove Knausgaard, had fewer qualms). Yet, in October 2016, an investigative journalist writing in the New York Review of Books allegedly revealed the identity of the novelist, a string of payments seemingly leading to a name, which I will not repeat here out of respect for the author’s wishes.

The mystery of the author’s identity continues to fascinate, but Costanzo has no interest in it. “I don’t care. Deeply, I’m not curious at all to know who Elena Ferrante is. I believe in the reality of the books she writes. And they are very real: once you put them on screen, with very little effort, they are like a flower – they bloom.” The flowers were helped along by regular sprinklings of guidance from Ferrante, who communicated with Costanzo by email and, through her publishers, WhatsApp; she even provided some dialogue in dialect that wasn’t in the book.

On set, a press conference is held, somewhat surreally, among the bottles and imitation confectionery of the Bar Solara, which in the books is owned by a camorrista family. The young lead actors are present, speaking through an interpreter, as well as the director and a producer from Fandango. Costanzo speaks of Ferrante with reverence, admiration, and the occasional hint of exasperation. “We cooperated in the writing project, sending emails to each other. Very formal emails. I can’t say I am friends with Elena Ferrante – I am just collaborating with her, him, I don’t know.”

The Observer’s Kathryn Bromwich outside Bar Solara, part of the sprawling set constructed for the show outside Naples.

Did he use the informal “tu” or the formal “lei”?

“No, lei,” he laughs. “It’s like in the 19th century.”

On the collaborative process, he veers between the positive (“She gave us very good advice, she was not defensive at all – just guarded”) to the more barbed (“It’s like working with a ghost. It’s kind of a nightmare, I’ll tell you. It’s terrible, because you start dreaming at night about something that has no face, it’s nothing”). At times, Ferrante sounds like a particularly exacting thesis supervisor: “She goes for truth even when she writes to you. So she can be not at all delicate and if you feel a bit weak, she’s… demanding.” And yet, he adds, the fact that the communication was solely through writing kept the relationship healthy, work-related, focused on generating clear ideas.

Months later, the series now complete, he tells me that Ferrante has seen the show and is “very satisfied”. He repeats the phrase a couple more times, with equal parts relief and incredulity, but that is all he has to say. “You should ask her, because I cannot talk for her.” (The publicist says she is not answering questions.)

My Brilliant Friend premiered at the Venice film festival at the start of September, where two of the eight hour-long episodes were shown (the plan is to make four series, one for each book). It was warmly received, eliciting a 10-minute standing ovation and cautiously optimistic reviews. Variety called it “an impressive effort, a translation of novel to screen that preserves certain of its literary qualities while transmuting others into moving and effective TV”, while the Hollywood Reporter said: “this limited sampling points to a handsome, largely dedicated Ferrante adaptation that… is marked by spectacular casting of its inexperienced leads”.

The first two episodes follow Elena and Lila as children; at the end, their paths diverge when one is allowed to continue her education while the other is taken out of school to work in the family business. The girls are played, respectively, by Elisa Del Genio, 11, and Ludovica Nasti, 12; their teenage selves are portrayed by Margherita Mazzucco, 16, and Gaia Girace, 15. The characters’ personalities and friendship – alternating between rivalry and support, arguments and reconciliation – are the focal point of the books, so getting the casting right was crucial.

All four young leads had done little or no acting before, so the lengthy audition process doubled as an intensive acting workshop, in which they also learned the very specific local dialect. They were cast not only for their acting ability and physical similarity to the characters – and they do look remarkably like the figures evoked in Ferrante’s books – but also based on their own personalities. The younger ones, especially, were asked to play exaggerated versions of themselves.

When we meet Del Genio and Nasti, accompanied on set by their mothers, they are perfect embodiments of their characters. Del Genio, who plays the shy lead, Elena, clings to her mother and sister. She is half Norwegian, and from one of the wealthier areas of Naples. She had accompanied her brother to a callback; he didn’t get a role but she did. Nasti, who plays the strong-willed Lila, strides around fearlessly, introducing herself to the assembled journalists, dressed in a bright, kimono-like dress and booties. She says her favourite scenes were throwing rocks at boys and the argument with her father in which he throws her out of a window. She likes football but is disappointed Italy failed to make the World Cup. She is a child model and points out she is from Pozzuoli, just outside Naples, “like Sophia Loren”. She is referred to on set as “the boss”.

Costanzo says Elena was a difficult role to cast. She is at the centre of the narrative but has to “give room” to Lila: “Elena needs a personality, something to tell, but also a kind of acquiescence, an ability to listen.” Lila, on the other hand, “is like a giant. It’s hard to find a giant.” Nasti, he says, is “a genius – she’s a kid but has a knowledge of life which is much bigger than mine”. He is probably referring to the fact that, aged four, she began chemotherapy for leukaemia; cutting her hair short for the role was a big decision, but she was determined to do it.

Gaia Girace, left, and Margherita Mazzucco play Lila and Elena as teenagers. Photograph: Eduardo Castaldo

The teenage Lila, Girace, has a slightly different energy – she is pale, softly spoken, more enigmatic – that fits the change in the character as she grows up. “I fell in love with my character from the first scene I had to play, so I wanted to get that part at all costs,” she says of the seven-month audition process. “I like the fact that she’s observant and empathetic. But it’s a difficult character to play, because she’s very complex, she changes attitude in an instant. I was able to understand Lila only by acting her. She gives the appearance of being very strong – maybe if you read the book you might think she’s bad, but that’s not true, she contains a lot more: she has a fragility that she conceals.”

Of the friendship between the characters, she says: “The bond between Lila and Lenù [Elena] is magical: they complete each other. Lila is strong, but fragile inside, and Lenù, the apparently weak one, is strong inside. Theirs is not a common friendship – there is always a distance, but they always end up getting closer.”

While Girace has always wanted to act, Mazzucco had been planning to pursue either languages or architecture. Then she was handed a flyer about the auditions outside school; she asked her parents if she could go, out of curiosity, since many of her classmates had auditioned. She attended the last day of casting. “In the beginning, I didn’t like Elena very much,” she says, “I preferred Lila, because she’s more dynamic. Elena was just too calm, passive.” But once she got the role, she read all the books: “I began to understand the character much better, and then I liked her. At first glance Elena seems shy and reserved, but in reality she has a great determination, discipline and courage, which will allow her to get away from poverty and change her life through study.”

Ferrante’s writing creates such vivid pictures in the mind of the reader that arriving at the set feels strangely like visiting an area inside your own imagination, something you personally came up with while reading the books. It is in fact a recreation of Rione Luzzatti, the neighbourhood near Naples’ industrial zone never named but understood to be the setting for the girls’ childhood in the books. In the 50s it was in the middle of nowhere; in the intervening years the city has been built around it. On set, we meet the production designer Giancarlo Basili, who usually works on feature films, with directors such as Abbas Kiarostami. He went to live in the rione for a week, taking notes, speaking to locals; the team then used that information to construct the 14 apartment buildings.

Tourists are discouraged from visiting the real rione in Naples: it’s too run-down, too depressing, and there is also the issue of well heeled literature enthusiasts gawping at what is still a very deprived area of the city. But the set is evidently realistic: when construction was finished, Basili invited a man from the rione who had lived there in the 50s and 60s to see it; he was so overcome he ended up in tears.

The region we are in, Campania, is a place of great inequality: much of Ferrante’s quartet is about the sharply changing fortunes of its characters, whether through education or by other means. Costanzo aims neither to glorify Naples nor expose its worst aspects. “For us, it was important to be authentic,” he says. “We don’t hide anything of Naples, we are not making postcards.” Fandango producer Domenico Procacci, who worked on the 2008 film Gomorrah based on Roberto Saviano’s book, remembers the negative reaction that movie received for its depiction of the camorra in Naples. “When we went to Cannes with that film the reaction was almost violent. People believed the film portrayed an image of Naples that was repellent. Politicians said the city lost money because many tourists stopped going. In this case, it’s totally different – there’s going to be a discussion of a new way of doing epic neorealism, rather than a discussion about current affairs.”

That doesn’t mean the series shows Naples in a flattering or rose-tinted light. Violence permeates every stage of the girls’ lives from early childhood onward. Organised crime is pervasive: although it is in the form of the wealthy, faintly ridiculous Solara brothers, it has real consequences. Maestra Oliviero, their initially kind teacher, has an angry outburst against “la plebe”, plebs. But, rather than making these issues her focus, Ferrante’s work centres on her characters’ inner lives and how they respond to their environment.

In this way, Ferrante casts a new light on the places she writes about. In the book, Lila and Elena discuss an idea: “When there is no love, not only the life of the people becomes sterile but the life of cities.” Something similar might be said of art, through which a city can be given new life, whatever bad things may have happened there. Ferrante holds up a mirror, showing the flaws in the places and people around her, but also the things that are valuable.

“I believe [the book series] means a lot for Naples,” Costanzo tells me. “In a way, Ferrante’s book is keeping the real heart of Naples intact. I think it gives the city a lot of energy, a story like this, compared to just mobster stories, crime. There is something very ancient, very old that belongs to Naples in this series, even if the city has changed a lot over the years. Because the heart of Naples is still the same as in Elena Ferrante’s book, even nowadays.”

The first episode of My Brilliant Friend airs on 19 November at 9pm on Now TV and Sky Atlantic