Greta’s father, Svante, and I are what is known in Sweden as “cultural workers” – trained in opera, music and theatre with half a career of work in those fields behind us. When I was pregnant with Greta, and working in Germany, Svante was acting at three different theatres in Sweden simultaneously. I had several years of binding contracts ahead of me at various opera houses all over Europe. With 1,000km between us, we talked over the phone about how we could get our new reality to work.

“You’re one of the best in the world at what you do,” Svante said. “And as for me, I am more like a bass player in the Swedish theatre and can very easily be replaced. Not to mention you earn so damned much more than I do.” I protested a little half-heartedly but the choice was made.

A few weeks later we were at the premiere for Don Giovanni at the Staatsoper in Berlin and Svante explained his current professional status to Daniel Barenboim and Cecilia Bartoli.

“So now I’m a housewife.”

We carried on like that for 12 years. It was arduous but great fun. We spent two months in each city and then moved on. Berlin, Paris, Vienna, Amsterdam, Barcelona. Round and round. We spent the summers in Glyndebourne, Salzburg or Aix-en-Provence. As you do when you’re good at singing opera and other classical music. I rehearsed 20 to 30 hours a week and the rest of the time we spent together.

Beata was born three years after Greta and we bought a Volvo V70 so we’d have room for doll’s houses, teddy bears and tricycles. Those were fantastic years. Our life was marvellous.

One evening in the autumn of 2014, Svante and I sat slumped on our bathroom floor in Stockholm. It was late, the children were asleep. Everything was starting to fall apart around us. Greta was 11, had just started fifth grade, and was not doing well. She cried at night when she should be sleeping. She cried on her way to school. She cried in her classes and during her breaks, and the teachers called home almost every day. Svante had to run off and bring her home to Moses, our golden retriever. She sat with him for hours, petting him and stroking his fur. She was slowly disappearing into some kind of darkness and little by little, bit by bit, she seemed to stop functioning. She stopped playing the piano. She stopped laughing. She stopped talking. And she stopped eating.

We sat there on the hard mosaic floor, knowing exactly what we would do. We would change everything. We would find the way back to Greta, no matter the cost. The situation called for more than words and feelings. A closing of accounts. A clean break.

“How are you feeling?” Svante asked. “Do you want to keep going?”

“No.”

“OK. Fuck this. No more,” he said. “We’ll cancel everything. Every last contract,” Svante went on. “Madrid, Zurich, Vienna, Brussels. Everything.”

One Saturday soon afterwards, we decide we’re going to bake buns, all four of us, the whole family, and we’re determined to make this work. It has to. If we can bake our buns as usual, in peace and quiet, Greta will be able to eat them as usual, and then everything will be resolved, fixed. It’s going to be easy as pie. Baking buns is after all our favourite activity. So we bake, dancing around in the kitchen so as to create the most positive, happiest bun-baking party in human history.

But once the buns are out of the oven the party stops in its tracks. Greta picks up a bun and sniffs it. She sits there holding it, tries to open her mouth, but… can’t. We see that this isn’t going to work.

“Please eat,” Svante and I say in chorus. Calmly, at first. And then more firmly. Then with every ounce of pent-up frustration and powerlessness. Until finally we scream, letting out all our fear and hopelessness. “Eat! You have to eat, don’t you understand? You have to eat now, otherwise you’ll die!”

Then Greta has her first panic attack. She makes a sound we’ve never heard before, ever. She lets out an abysmal howl that lasts for over 40 minutes. We haven’t heard her scream since she was an infant.

I cradle her in my arms, and Moses lies alongside her, his moist nose pressed to her head. Greta asks, “Am I going to get well again?”

“Of course you are,” I reply.

“When am I going to get well?”

“I don’t know. Soon.”

Facebook Twitter Pinterest Malena Ernman and Svante Thunberg with their daughters, newborn Beata and Greta aged three, 2005. Photograph: Lizzie Larsson/TT/PA Images

On a white sheet of paper fixed to the wall we note down everything Greta eats and how long it takes for her to eat it. The amounts are small. And it takes a long time. But the emergency unit at the Stockholm Centre for Eating Disorders says that this method has a good long-term success rate. You write down what you eat meal by meal, then you list everything you can eat, things you wish you could eat and things you want to be able to eat further down the line.

It’s a short list. Rice, avocados and gnocchi.

School starts in five minutes. But there isn’t going to be any school today. There isn’t going to be any school at all this week. Yesterday Svante and I got another email from the school expressing their “concern” about Greta’s lack of attendance, despite the fact that they were in possession of several letters from both doctors and psychologists explaining her situation.

Again, I inform the school office of our situation and they reply with an email saying that they hope Greta will come to school as usual on Monday so “this problem” can be dealt with. But Greta won’t be in school on Monday. Because unless a sudden dramatic change occurs she’s going to be admitted to Sachsska children’s hospital next week.

Svante is boiling gnocchi. It is extremely important that the consistency is perfect, otherwise it won’t be eaten. We set a specific number of gnocchi on her plate. It’s a delicate balancing act; if we offer too many our daughter won’t eat anything and if we offer too few she won’t get enough. Whatever she ingests is obviously too little, but every little bite counts and we can’t afford to waste a single one.

Then Greta sits there sorting the gnocchi. She turns each one over, presses on them and then does it again. And again. After 20 minutes she starts eating. She licks and sucks and chews: tiny, tiny bites. It takes for ever.

“I’m full,” she says suddenly. “I can’t eat any more.”

Svante and I avoid looking at each other. We have to hold back our frustration, because we’ve started to realise that this is the only thing that works. We’ve explored all other tactics. Every other conceivable way. We’ve ordered her sternly. We’ve screamed, laughed, threatened, begged, pleaded, cried and offered every imaginable bribe. But this seems to be what works the best.

She devotes the whole Christmas break to telling us about unspeakably awful incidents

Svante goes up to the sheet of paper on the wall and writes:

Lunch: 5 gnocchi. Time: 2 hours and 10 minutes.

Not eating can mean many things. The question is what. The question is why. Svante and I look for answers. I spend the evenings reading everything I can find on the internet about anorexia and eating disorders. We’re sure it’s not anorexia. But, we keep hearing that anorexia is a very cunning disorder and will do anything to evade discovery. So we keep that door wide open.

I speak endlessly to the children’s psychiatry service (BUP), the healthcare information service, doctors, psychologists and every conceivable acquaintance who may be able to offer the least bit of knowledge or guidance.

At Greta’s school there’s a psychologist who is experienced with autism. She talks with both of us on the phone and says that a careful investigation must still be conducted, but in her eyes – and off the record – Greta shows clear signs of being on the autism spectrum. “High-functioning Asperger’s,” she says.

Meeting after meeting follows where we repeat our story and explore our options. We talk away while Greta sits silently. She has stopped speaking with anyone except me, Svante and Beata. Everyone really wants to offer all the help they can but it’s as if there’s no help to be had. Not yet, at least. We’re fumbling in the dark.

After two months of not eating Greta has lost almost 10kg, which is a lot when you are rather small to begin with. Her body temperature is low and her pulse and blood pressure clearly indicate signs of starvation. She no longer has the energy to take the stairs and her scores on the depression tests she takes are sky high. We explain to our daughter that we have to start preparing ourselves for a stay at the hospital, where it’s possible to get nutrition and food without eating, with tubes and drips.

In mid-November there’s a big meeting at BUP. Greta sits silently. As usual. I’m crying. As usual. “If there are no developments after the weekend then we’ll have to admit you to the hospital,” the doctor says.

On the stairs down to the lobby Greta turns round. “I want to start eating again.” All three of us burst into tears and we go home and Greta eats a whole green apple. But nothing more will go down. As it turns out, it’s a little harder than you think to just start eating again. We take a few careful, trial steps and it works. We inch forward. She eats tiny amounts of rice, avocado and bananas. We take our time. And we start on sertraline, an antidepressant.

“Do they always look at you that way?”

“Don’t know. Think so.”

Svante and Greta have been at the end-of-term ceremony at school where they tried to make themselves invisible in the corridors and stairwells. When students openly point and laugh at you – even though you’re walking alongside your parent – then things have gone too far. Way too far.

At home in the kitchen, Svante explains to me what they’ve just experienced while Greta eats her rice and avocado. I get so angry at what I hear that I could tear down half the street we live on with my bare hands, but our daughter has a different reaction. She’s happy it’s in the open.

She devotes the whole Christmas break to telling us about unspeakably awful incidents. It’s like a movie montage featuring every imaginable bullying scenario. Stories about being pushed over in the playground, wrestled to the ground, or lured into strange places, the systematic shunning and the safe space in the girls’ toilets where she sometimes manages to hide and cry before the break monitors force her out into the playground again. For a full year, the stories keep coming. Svante and I inform the school, but the school isn’t sympathetic. Their understanding of the situation is different. It’s Greta’s own fault, the school thinks; several children have said repeatedly that Greta has behaved strangely and spoken too softly and never says hello. The latter they write in an email.

They write worse things than that, which is lucky for us, because when we report the school to the Swedish schools inspectorate we’re on a firm footing and there’s no doubt that the inspectorate will rule in our favour.

I explain to Greta that she’ll have friends again, later. But her response is always the same. “I don’t want to have a friend. Friends are children and all children are mean.”

Greta’s pulse rate gets stronger and finally the weight curve turns upwards strongly enough for a neuropsychiatric investigation to begin. Our daughter has Asperger’s, high-functioning autism and OCD, obsessive-compulsive disorder. “We could formally diagnose her with selective mutism, too, but that often goes away on its own with time,” the doctor tells us. We aren’t surprised. Basically, this was the conclusion we drew several months ago.

On the way out, Beata calls to tell us she’s having dinner with a friend, and I feel a sting of guilt. Soon we’ll take care of you too, darling, I promise her in my mind, but first Greta has to get well.

Summer is coming, and we walk the whole way home. We almost don’t even need to ration the burning of calories any more.

Six months after Greta received her diagnosis, life has levelled out into something that resembles an everyday routine. She has started at a new school. I’ve cleared my calendar and put work on the back burner. But while we’re full up with taking care of Greta, Beata’s having more and more of a tough time. In school everything is ticking along. But at home she falls apart, crashes. She can’t stand being with us at all any more. Everything Svante and I do upsets her and in our company she can lose control. She is clearly is not feeling well.

One day near her 11th birthday I find her standing in the living room, hurling DVDs from the bookshelf down the spiral staircase to the kitchen. “You only care about Greta. Never about me. I hate you, Mum. You are the worst bloody mother in the whole world, you bloody fucking bitch,” she screams as Jasper the Penguin hits me on the forehead.

It’s autumn 2015 when Beata undergoes an evaluation for various neurodevelopmental disorders. She is diagnosed with ADHD, with elements of Asperger’s, OCD and ODD [oppositional defiant disorder]. Now that she has the diagnosis it feels like a fresh start for her, an explanation, a redress, a remedy. At school she has marvellous teachers who make everything work. She doesn’t have to do homework. We drop all activities. We avoid anything that may be stressful. And it works. Whatever happens we must never meet anger with anger, because that, pretty much always, does more harm than good. We adapt and we plan, with rigorous routines and rituals. Hour by hour. We try to find habits that work.

Facebook Twitter Pinterest Outside the Swedish parliament in Stockholm, August 2018. Photograph: Anders Hellberg

The fact that our children finally got help was due to a great many factors. In part it was about existing care, proven methods, advice and medication. It was also thanks to our own toil, patience, time and luck that Greta and Beata found their way back on their feet. However, what happened to Greta in particular can’t be explained simply by a psychiatric label. In the end, she simply couldn’t reconcile the contradictions of modern life. Things simply didn’t add up. We, who live in an age of historic abundance, who have access to huge shared resources, can’t afford to help vulnerable people in flight from war and terror – people like you and me, but who have lost everything.

In school one day, Greta’s class watches a film about how much rubbish there is in the oceans. An island of plastic, larger than Mexico, is floating around in the South Pacific. Greta cries throughout the film. Her classmates are also clearly moved. Before the lesson is over the teacher announces that on Monday there will be a substitute teaching the class, because she’s going to a wedding over the weekend, in Connecticut, right outside of New York. “Wow, lucky you,” the pupils say. Out in the corridor the trash island off the coast of Chile is already forgotten. New iPhones are taken out of fur-trimmed down jackets, and everyone who has been to New York talks about how great it is, with all those shops, and Barcelona has amazing shopping too, and in Thailand everything is so cheap, and someone is going with her mother to Vietnam over the Easter break, and Greta can’t reconcile any of this with any of what she has just seen.

She saw what the rest of us did not want to see. It was as if she could see our CO2 emissions with her naked eye. The invisible, colourless, scentless, soundless abyss that our generation has chosen to ignore. She saw all of it – not literally, of course, but nonetheless she saw the greenhouse gases streaming out of our chimneys, wafting upwards with the winds and transforming the atmosphere into a gigantic, invisible garbage dump.

She was the child, we were the emperor. And we were all naked.

‘You celebrities are basically to the environment what anti immigrant politicians are to multicultural society,” Greta says at the breakfast table early in 2016. I guess it’s true. Not just of celebrities, but of the vast majority of people. Everyone wants to be successful, and nothing conveys success and prosperity better than luxury, abundance and travel, travel, travel.

Greta scrolls through my Instagram feed. She’s angry. “Name a single celebrity who’s standing up for the climate! Name a single celebrity who is prepared to sacrifice the luxury of flying around the world!”

I was a part of the problem myself. Only recently I had been posting sun-drenched selfies from Japan. One “Good morning from Tokyo” and tens of thousands of “likes” rolled in to my brand-new iPhone. Something started to ache inside of me. Something I’d previously called travel anxiety or fear of flying but which was now taking on another, clearer form. On 6 March 2016 I flew home from a concert in Vienna, and not long after that I decided to stay on the ground for good.

A few months later we walked home from the airport shuttle having met Svante and Beata off a flight from Rome.“You just released 2.7 tonnes of CO2,” Greta says to Svante. “And that corresponds to the annual emissions of five people in Senegal.” “I hear what you’re saying,” Svante says, nodding. “I’ll try to stay on the ground from now on, too.”

Facebook Twitter Pinterest Fridays For Future climate change protest, Stockholm, November 2018. Photograph: IBL/Shutterstock

Greta started planning her school strike over the summer of 2018. Svante has promised to take her to a building supplier’s to buy a scrap piece of wood that she can paint white and make a sign out of. “School Strike for the Climate”, it will say. And although more than anything we want her to drop the whole idea of going on strike from school – we support her. Because we see that she feels good as she draws up her plans – better than she has felt in many years. Better than ever before, in fact.

On the morning of 20 August 2018, Greta gets up an hour earlier than on a regular school day. She has her breakfast. Fills a backpack with schoolbooks, a lunchbox, utensils, a water bottle, a cushion and an extra sweater. She has printed out 100 flyers with facts and source references about the climate and sustainability crisis.

She walks her white bicycle out of the garage and rolls off to parliament. Svante cycles a few metres behind her, with her home-made sign under his right arm The weather is rather lovely. The sun is rising behind the old town and there is little chance of rain. The cycle paths and pavements are filled with people on their way to work and school.

Outside the prime minister’s office, Greta stops and gets off her bicycle. Svante helps her take a picture before they lock the bicycles. Then she nods an almost invisible goodbye to Dad and, with the sign in her arms, staggers around the corner towards the government block where she stops and leans the sign against the greyish-red granite wall. Sets out her flyers. Settles down.

She asks a passerby to take another picture with her phone and posts both pictures on social media. After a few minutes the first sharing on Twitter starts. The political scientist Staffan Lindberg retweets her post. Then come another two retweets. And a few more. The meteorologist Pär Holmgren. The singer-songwriter Stefan Sundström. After that, it accelerates. She has fewer than 20 followers on Instagram and not many more on Twitter. But that’s already changing.

Now there is no way back.

A documentary film crew shows up. Svante calls and tells her that the newspaper Dagens ETC has been in touch with him and are on their way. Right after that [another daily newspaper] Aftonbladet shows up and Greta is surprised that everything is moving so fast. Happy and surprised. She wasn’t expecting this.

Ivan and Fanny from Greenpeace show up and ask Greta if everything is OK. “Can we help with anything?” they ask. “Do you have a police permit?” Ivan asks. She doesn’t. She didn’t think a permit would be needed. But evidently it is. “I can help you,” Ivan says.

Greenpeace is far from alone in offering its support. Everyone wants to do their utmost to help out. But Greta doesn’t need any help. She manages all by herself. She is interviewed by one newspaper after the next. The simple fact that she is talking to strangers without feeling unwell is an unexpected joy for us parents. Everything else is a bonus.

The first haters start to attack, and Greta is openly mocked on social media. She is mocked by anonymous troll accounts, by rightwing extremists. And she is mocked by members of parliament. But that’s no surprise.

Facebook Twitter Pinterest Greta’s Christmas 2018 Instagram post: ‘Happy holidays from me and my family!’ Photograph: Courtesy Greta Thunberg via instagram

Svante stops by to make sure that everything is OK. He does this a couple of times every day. Greta stands by the wall and there are a dozen people around her. She looks stressed. The journalist from [newspaper] Dagens Nyheter asks whether it’s OK if they film an interview, and Svante sees out of the corner of his eye that something is wrong. “Wait, let me check,” he says, and takes Greta behind a pillar under the arch. Her whole body is tense. She is breathing heavily, and Svante says that there’s nothing to worry about. “Let’s go home now,” he says. “OK?” Greta shakes her head. She’s crying.

“You don’t need to do any of this. Let’s forget about this and get out of here.” But Greta doesn’t want to go home. She stands perfectly still for a few seconds. Breathes. Then she walks around in a little circle and somehow pushes away all that panic and fear that she has been carrying inside her for as long as she can remember. After that she stops, and stares straight ahead. Her breathing is still agitated and tears are running down her cheeks. “No,” she says. “I’m doing this.”

We monitor how Greta is feeling as closely as we can. But we can’t see any signs that she’s feeling anything but good. She sets the alarm clock for 6.15am and she’s happy when she gets out of bed. She’s happy as she cycles off to parliament, and she’s happy when she comes home in the afternoon. During the afternoons she catches up on schoolwork and checks social media. She goes to bed on time, falls asleep right away and sleeps peacefully the whole night long. Eating, on the other hand, is not going well.

“There are too many people and I don’t have time. Everyone wants to talk all the time.”

“You have to eat,” Svante says. Greta doesn’t say anything. Food is a sensitive topic. The most difficult one. But on the third day something else happens. Ivan from Greenpeace stops by again. He’s holding a white plastic bag. “Are you hungry, Greta? It’s noodles. Thai,” he says. “Vegan. Would you like some?”

He holds out the bag and Greta leans forward and reaches for the food container. She opens the lid and smells it a few times. Then she takes a little bite. And another. No one reacts to what’s happening. Why would they? Why would it be remarkable for a child to be sitting with a bunch of people eating vegan pad thai? Greta keeps eating. Not just a few bites but almost the whole serving.

Play Video 2:06 Greta Thunberg: the speeches that helped spark a climate movement – video

Greta’s energy is exploding. There doesn’t seem to be any outer limit, and even if we try to hold her back she just keeps going. By herself.

Beata sits with Greta one day in front of parliament. But this is Greta’s thing. Not hers. The sudden fuss over her big sister is not easy to handle. Beata sees that Greta suddenly has 10,000 followers on Instagram, and we all think that’s crazy. But Beata handles it well. Even when her own feed is filled with comments about Greta, and can you tell her this and that. All everyone suddenly cares about is Greta, Greta and Greta. “It’s nuts,” Beata says one afternoon after school. “It’s exactly like Beyoncé and Jay-Z,” she states, with an acerbic emphasis. “Greta is Beyoncé. And I’m Jay-Z.”

We get death threats on social media, excrement through the letter box, and social services report that they have received a great number of complaints against us as Greta’s parents. But at the same time they state in the letter that they “do NOT intend to take any action”. We think of the capital letters as a little love note from an anonymous official. And it warms us.

More and more people are keeping Greta company in front of parliament. Children, adults, teachers, retirees. One day an entire class of elementary-school pupils stops and wants to talk, and Greta has to walk away for a bit. Feels mild panic. She steps aside and starts crying. She can’t help it. But after a while she calms herself down and goes back and greets the children. Afterwards she explains that she has a hard time associating with children sometimes because she has had such bad experiences. “I’ve never met a group of children that hasn’t been mean to me. And wherever I’ve been I’ve been bullied because I’m different.”

Several times a day people come up and say that they have stopped flying, parked the car or become vegans thanks to her. To be able to influence so many people in such a short time is bewildering in a good way. The phenomenon keeps growing. Faster and faster by the hour. In the run-up to the end of the strike, Greta is being followed by TV crews from the BBC, German ARD and Danish TV2.

Altogether 1,000 children and adults sit with Greta on the last day of the school strike. And media from several different countries report live from Mynttorget Square. She has succeeded. Some say that she alone has done more for the climate than politicians and the mass media have in years. But Greta doesn’t agree. “Nothing has changed,” she says. “The emissions continue to increase and there is no change in sight.”

At three o’clock Svante comes and picks her up and they walk together over to the bicycles outside Rosenbad.

“Are you satisfied?” Svante asks.

“No,” she says, with her gaze fixed on the bridge back towards the old town. “I’m going to continue.”

Facebook Twitter Pinterest Swedish activist Greta Thunberg leads a Fridays For Future rally in Turin, December 2019. Photograph: Alessandro Di Marco/EPA

The next day is Saturday 8 September. It’s the day before the Swedish parliamentary elections and Greta is going to speak at the People’s Climate March in Stockholm. She has only given one speech before at a small event. Prior to that she’d never spoken in front of more people than fit in a classroom, and on those few occasions she had not exactly seemed at ease.

There are a lot of people in the park for the march and the rally. Almost 2,000 have crowded together at the stage and more are on their way. Somehow there’s a different feeling about this protest. It doesn’t feel the same as usual. It feels as if something might happen. Soon. It’s no longer just the familiar faces. The regulars. The activists. The Greenpeace volunteers in polar-bear suits. Here, suddenly, are all conceivable kinds of people and characters. People who might have all sorts of jobs. “This is my first demonstration,” states a well-dressed man in his 40s. “Mine too,” a woman next to him says, with a laugh.

The host introduces Greta and she walks slowly but steadily into the middle of the stage. The audience cheers. Svante, on the other hand, is scared out of his wits. What will happen now? Will she start crying? Is she going to run away? He feels like an awful parent for not putting his foot down and saying “No” from the start. All this is starting to feel too big and unreal.

But Greta is as calm as can be. She takes the speech out of her pocket and looks out over the sea of people. Then she grasps the microphone and starts speaking. “Hi, my name is Greta,” she says in Swedish. “I am going to speak in English now. And I want you to take out your phones and film what I’m saying. Then you can post it on your social media.”

“My name is Greta Thunberg and I am 15 years old. And I have schoolstriked for the climate for the last three weeks. Yesterday was the last day. But…” She pauses. “We will go on with the school strike. Every Friday, as from now, we will sit outside the Swedish parliament until Sweden is in line with the Paris agreement.” The crowd cheers.

Greta continues. “I urge all of you to do the same. Sit outside your parliament or local government, wherever you are, until your country is on a safe pathway to a below-two-degree warming target. Time is much shorter than we think. Failure means disaster.”

Her voice is steady and there are no signs of nervousness. She appears to be at ease up there. She even smiles sometimes.

“The changes required are enormous and we must all contribute in every part of our everyday life. Especially us in the rich countries, where no nation is doing nearly enough.”

The audience stands up. Shouting, applauding. The ovation doesn’t stop. And Greta is smiling the most beautiful smile I have ever seen her smile. I’m watching everything from a live stream on my phone in the hallway outside the dressing rooms at the Oscarsteatern. The tears keep coming.

• This is an edited extract from Our House Is on Fire: Scenes of a Family and a Planet in Crisis by Malena and Beata Ernman, Greta and Svante Thunberg, published by Penguin on 5 March (£16.99). To order a copy go to guardianbookshop.com. Free UK p&p over £15