Anne Frank tried to cover up two pages of writing in her diary that contained dirty jokes and a description of what she referred to as “sexual matters,” pasting brown paper over the pages in her red-and-white plaid notebook.

But researchers have revealed the hidden text using new digital technologies, the Anne Frank House and two other Dutch cultural institutions announced on Tuesday.

Frank, the teenage diarist who wrote about coming of age in a secret attic annexe while in hiding from the Nazis during the Second World War, may have camouflaged the two pages because they contained prurient content that she did not want her father or someone else in the cramped quarters to discover.

“I sometimes imagine that someone might come to me and ask me to inform him about sexual matters,” Frank wrote in Dutch. “How would I go about it?” She attempts an answer, addressing an imaginary listener with a lofty tone, using phrases such as “rhythmical movements” to describe sex, and “internal medicament,” to refer to contraception.

She also touches on menstruation, “a sign that she is ripe”, and prostitution: “In Paris they have big houses for that.”

Peter de Bruijn, a senior researcher at the Huygens Institute for the History of the Netherlands, one of the partners in the research, said the newly uncovered pages are not significant for their sexual content because Frank explores similar matters in other parts of the diary, often in even more explicit terms. He said these pages were important because they show Frank’s first foray into trying to write in a more literary tone.

“She starts with an imaginary person whom she is telling about sex, so she creates a kind of literary environment to write about a subject she’s maybe not comfortable with,” he said.

In an interview, Ronald Leopold, executive director of the Anne Frank House, said, “It is really interesting and adds meaning to our understanding of the diary.”

“It’s a very cautious start to her becoming a writer,” he said. “It’s still very early stages.”

The two newly revealed pages were written in Frank’s first diary on September 28, 1942, when she was 13 years old. During her time in hiding, she wrote two versions of the diary. The first was written in a series of small notebooks, from her 13th birthday on June 12, 1942, until August 1, 1944, and was intended strictly for herself.

But one day she heard on the radio that the Dutch government in exile was planning to publish eyewitness accounts of people’s suffering under the German occupation, and she resolved to write a new book she called “The Secret Annexe,” based on her diaries, which she hoped to submit after the war. She completed 215 loose pages in a couple of months, but in August 1944, she and her family were discovered, arrested and deported. She died in the Bergen-Belsen concentration camp three months before her 16th birthday, in 1945.

De Bruijn said Frank may have also pasted over the pages as a form of self-editing as she revised her diary in preparation for the second, public version.

Researchers at the Anne Frank House discovered the two hidden pages in the original version of the diary while they were checking its condition and photographing the pages in 2016. The notebooks are in storage for safe keeping and only examined once every 10 years.

Until now, the technology that would have allowed researchers to look at the covered pages without destroying them wasn’t available. “When you touch the pages they can be damaged, so we don’t touch them,” said Teresien da Silva, head of collections at the Anne Frank House. Using photo-imaging software, they were able to decipher text beneath the brown paper without any contact with the pages.

Could it be considered disrespectful to reveal pages that Frank wanted to hide?

“You can compare it, for example, with finding out that there’s something painted underneath a Rembrandt masterpiece,” da Silva said. “When you discover that you want to know what’s underneath, because it can tell you about how he worked.”

She also compared it to salvaging the writings of Franz Kafka, who wanted to destroy many of his own literary works. “It’s not always good to follow the wish of an author,” she said. “It’s important sometimes for scientific research and also good to know for the public what she didn’t want to publish.”

A spokeswoman for the Anne Frank House said the museum would make the new text available on its website, but only in Dutch at the moment, because of copyright restrictions. She said she did not know when the text would be available in English.