Albert Gomes de Mesquita is one of the last people alive to have known Anne Frank in person. He appears briefly in her diary as a fellow student at the Jewish Lyceum in Amsterdam, where she writes of him: “Albert de Mesquita came from the Montessori School and jumped a year. He’s really clever.”

There is nothing else. In all likelihood, Albert more or less vanished from her memory, but for him the situation is, inevitably, very different.

As the years have gone by his memories of Anne have become ever more important. Aged 89, he still travels internationally to conferences on her work and life. Anne has become a strange kind of celebrity and Albert, as someone who was actually there at the birthday party at which she was given her still-empty diary, is a point of contact for that fame.

Anne’s diary, which she kept for just over two years from her 13th birthday on 12 June 1942 to the moment of the Nazi raid on the secret annex where she lived in hiding with her family, has been translated into 60 languages and has sold more than 30m copies. It is one of the world’s most famous books. I asked Albert – who is the former husband of Lien de Jong (the subject of my book The Cut Out Girl, which describes how Lien was sent to stay with my grandparents, and her trauma as one of the Netherlands “hidden children”) – what he thought when he first read it and how he feels about it now. “My first reaction,” he told me, “was that I could have written that story myself, but then later I realised that what made it special lay not in the events that she experienced (after all, I had undergone the same things myself) but in her personal growth.” Albert’s family went into hiding at the same moment and in the same manner. They too were discovered, but, unlike the Franks, the De Mesquitas had a miraculous escape.

For just one month, Anne and Albert were in daily contact. As a younger, shy, rather frail-looking boy he found her a bit intimidating. On one occasion, in a biology lesson, their teacher explained that a horse and a donkey, put together in a stable, could produce a mule. Albert raised his hand to ask how this happened, sparking roars of hilarity from the class. Afterwards, in the playground, it was Anne who was the first to come up to him with the offer of an explanation. He nervously declined.

What Albert says about the diary, which has just come out in a new English translation as part of the authorised Collected Works, is true and important. The diary takes the reader on a journey with its author. For the first month, before the family goes into hiding, it is the story of a clever, extrovert schoolgirl, who is almost oblivious to the growing threat to Dutch Jews. Instead of the war, she is concerned with her own character and reputation. Anne writes proudly of the “throng of admirers who can’t keep their adoring eyes off me and who sometimes have to resort to using a broken pocket mirror to try and catch a glimpse of me in the classroom”. There are wicked descriptions of her schoolmates. She reports on how teachers are exasperated by her talkativeness, setting her a series of punishment essays titled A Chatterbox, then An Incorrigible Chatterbox, and finally Quack, quack, quack, said Mistress Chatterback. In response to this last commission, Anne wrote a comic poem about an enraged swan who commits murderous attacks on a set of noisy ducklings. In spite of his better judgment, her teacher admitted it was so good that it had to be read aloud to the class.

Facebook Twitter Pinterest Anne’s entry in the friendship book of her classmate Dinie, 1940. Photograph: Anne Frank Fonds, Basel, Switzerland

When this boisterous girl is suddenly cooped up in a set of small rooms with blacked out windows, which she has to share with another family who are virtual strangers to her, the effect on her “personal growth” is obvious. She remains inventive and sassy, but the pressures of communal living mixed with spells of raw terror at moments of near discovery take their toll. Anne feels alienated from her mother and is irritated by Mrs van Pels (the mother of the other family). She has to share a bedroom with a middle-aged man and grows to loathe him (calling him “Mr Duffer” as she recounts their silent small-scale battles). She falls in love with Peter van Pels, although their relationship fails to progress. At the same time she is conscious of the changes in her adolescent body, her sexual feelings, and the sudden mood swings that lead to floods of tears.

Amid all this, as the years pass, Anne reads extensively and develops an increasing passion for her writing. She composes short stories, comic anecdotes, and begins a novel. Most important, after hearing a radio broadcast from the Dutch government about the need for records of the occupation, Anne started to revise her diary early in 1944 in the hope that it might be published. She expanded key episodes and deleted others. At times she also inserted reflections on her earlier self.

This dialogue between the older and younger Anne is one of the many magical things about the diary. On 22 January 1944, for example, Anne reread her entry for 2 November 1942 and wrote on it as follows:

I wouldn’t be able to write that kind of thing any more. [...] The whole time I’ve been here I’ve longed unconsciously – and at times consciously – for trust, love and physical affection. This longing may change in intensity, but it’s always there.

The diary in its second version became more elevated, with passages on feminism, Jewish identity, and the haunting question of who might come to read the book. Its final entry, on 1 August 1944, reflected on Anne’s inner divisions. “I’m split in two,” she tells the reader:

One side contains my exuberant cheerfulness, my flippancy, my joy in life and, above all, my ability to appreciate the lighter side of things. [...] This side of me is usually lying in wait to ambush the other one, which is much purer, deeper and finer. No one knows Anne’s better side.

Three days later a squad of German police burst into the annex and arrested its occupants. After a month in the Dutch transit camp of Westerbork, the group was put on the last ever transport to Auschwitz. By May 1945 all except Anne’s father, Otto Frank, were dead.

Anne Frank: The Collected Works is a magisterial edition. It gives the Diary in three different versions. Version A is the one that Anne actually wrote on the days themselves: a messy text, with some entries out of date-order, full of comic digressions. Typical is the following checklist of Anne’s own beauty:

1. blue eyes, black hair: (no.)

2. dimples in cheeks (yes.)

3. dimple in chin (yes.)

4. widow’s peak (no.)

5. white skin (yes.)

6. straight teeth (no.)

7. small mouth (no.)

8. curly eyelashes (no.)

9. straight nose (yes.) [at least so far.]

10. nice clothes (sometimes.) [not nearly enough in my opinion.]

11. nice fingernails (sometimes.)

12. intelligent (sometimes.)

Version A was in fact spread across four volumes, only the first of which was a birthday present. There is a missing volume in this sequence, which would have covered the time from 2 May 1943 to 22 December 1943.

Version B is Anne’s own revision, largely written out on loose sheets of carbon paper. It runs uninterrupted from 20 June 1942 to March 1944 and so gives us the narrative that was lost through the missing volume of Version A. It is more serious than its predecessor, with a careful chronology charting the progress of the war.

The version now known as C was that published by Anne’s father in 1947 under the title The Hidden Annex. This version cut the sexual material in the diary and also removed a lot of the criticism that Anne had made of her fellow hideaways. Otto also made some aesthetic changes. He blended and reordered Versions A and B to give the book a more coherent and literary character. In his version, after a brief prologue (“I hope I will be able to confide everything to you … ”) the book opens on the diary itself:

I’ll begin from the moment I got you, the moment I saw you lying on the table among my other birthday presents. (I went along when you were bought, but that doesn’t count.)

That famous opening was there neither in A (which begins “Gorgeous photograph isn’t it!!!!”) nor in B, which starts more self-consciously:

It’s an odd idea for someone like me, to keep a diary; not only because I have never done so before, but because it seems to me that neither I – nor for that matter anyone else – will be interested in the unbosomings of a thirteen-year-old schoolgirl.

Anne did write the famous sentences that are now the opening, but they came further on in Version A and were excluded from Version B.

Otto Frank, then, played a part in the creation of Anne Frank’s diary as readers know it today, and one of the virtues of The Collected Works is that it allows readers to track the evolution of the diary across its different incarnations. The collection, however, contains much more than just the diary. There are beautiful and moving illustrations, which include family photos; closeups of documents; facsimile pages; and a plan of the hidden annex. Also included are Anne’s various other writings: 14 short stories; her uncompleted novel; a set of essays and reminiscences; previously unpublished letters; her verses in friendship books; her “Favourite Quotes Notebook”; and “The Egypt Book” (a collection of notes on the land of the Pharaohs that Anne made as a kind of home school project while in hiding). Finally, the editors provide a wealth of contextual material, from a history of Anne’s family (starting in the middle ages) to a history of the diary’s printing and reception (ending on Philip Roth’s 2007 novel Exit Ghost).

The Complete Works thus gives a greatly enriched picture, and, as one reads its pages, one cannot help thinking of what Anne might have become. In the diary she writes of wanting to be a journalist: “I’d like to spend a year in Paris and London learning the languages and studying art history [and] I still have visions of gorgeous dresses and fascinating people.” Looking over this volume, reading its witty sketches, it is easy to see how she might have achieved both of these things.

Perhaps that vision of the adult Anne is deceptive, however. Her diaries offer a picture of a young girl frozen in time. Who knows how she would have been affected by trauma, had she survived? Next year, Albert will celebrate his 90th birthday – the age Anne would have reached this coming June. As survivors, he and Lien de Jong (who turned 85 last year) have had a lifetime to look back on the horrors of the 1940s.

Facebook Twitter Pinterest Anne Frank with her father and sister in 1931. Photograph: United Archives GmbH/Alamy

Albert remembers not just Anne but all their classmates. One of these is Leo Slager, the boy Anne lists in her diary immediately after Albert as someone who “came from the same school, but isn’t as clever”. Albert and Leo shared a school bench and always cycled to the Lyceum together (at least until the Jewish possession of bicycles became an offence). One time, as they were pedalling side by side, Albert remembers that Leo suddenly braked and refused to go any further. Albert had used a German word. “Leo couldn’t abide German,” he tells me, and then adds sadly, “he didn’t survive the war.”

For Albert there was at least the comfort of survival together with his family, which meant there were always memories to share. Lien, as a sole survivor, had no one to fall back on, so the stories of her childhood faded. This was one of the things that struck me when I interviewed her. The kind of trivia that fills Anne Frank’s diary (her love of clothes or the fierce family arguments about whether boys as well as girls should be made to peel potatoes) was almost entirely missing. As we worked together, we had to rebuild her memories from tiny scraps, step by step to restore them to life.

As a piece of literature Anne Frank’s diary has come to define the Dutch experience of occupation, but her perspective on that period as a child in hiding is necessarily a restricted one. German-born Anne and her family had moved to Amsterdam when she was four to escape persecution, and she encounters the Dutch as brave protectors. Yet the death rate amongst Dutch Jews (at more than 75%, double that of any other western country) reflects a deeply collaborative nation, where most arresting officers were native, not German. For those who know this, one late entry in the diary is touched with irony:

Now that I’ve been spared, my first wish after the war is to become a Dutch citizen. I love the Dutch. I love this country. I love the language, and I want to work here. And even if I have to write to the Queen herself, I won’t give up until I’ve reached my goal!

Anne had not been “spared” as she had imagined. Less than a year after writing these words, she and her sister died of typhus in Bergen-Belsen. Their adopted country, in spite of all the bravery of their protectors, had failed to live up to their trust.

• The Cut Out Girl (Penguin) by Bart van Es won the 2018 Costa book of the year prize. Anne Frank: The Collected Works is published by Bloomsbury. To order a copy go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £15, online orders only. Phone orders min p&p of £1.99.