I first spoke with Naomi Adamu after she was freed from three years in captivity. She had been among the nearly 300 Nigerian schoolgirls kidnapped by Boko Haram terrorists from their dormitory in the town of Chibok in April 2014. International attention to that point had focused on the wildly popular, celebrity-driven social media campaign #BringBackOurGirls, rescue efforts and the horrors the girls’ captors subjected them to — forced labor, marriages and conversions to Islam. The girls themselves, in most accounts, were generally reduced to helpless, subdued prototypes of victimhood. But they were not.

As I discovered when I interviewed Adamu and some of the other young women, they were resourceful, defiant and tough. The proof is in the collaborative diaries they kept, which form the most authentic account of their ordeal. While the girls may not share the extraordinary literary skill of an Anne Frank, their writings should serve the same purpose. Frank’s diaries transformed her from a mere victim of the Nazis to a global symbol of resilience and hope. Through their diaries, we see that the Chibok girls, now women, often took their destinies into their own hands. These women, whose faith and identity could be more important to them than their well-being, defied and outwitted one of the world’s deadliest terrorist groups.

I learned about the diaries from the Nigerian government officials who welcomed the Chibok girls back from the Sambisa forest hideout of Boko Haram after the government negotiated their return. The freed women brought along personal belongings: underwear they had cut and sewn by hand with fabric from their hijabs; sticks they had carved from the bark of trees for styling their hair; and fliers inscribed with messages for Boko Haram — “Surrender or Die!” — which the Nigerian military occasionally dropped from planes and the girls gathered to use as toilet paper. Adamu still had her school uniform — she had defied the order to submit it for burning when Boko Haram gave the girls hijabs and flowing skirts. She wore the blue-check dress underneath her Boko Haram-approved clothing for the length of her captivity.

The government officials were stunned when Adamu also revealed the diaries concealed beneath her clothes, and later, she was incredulous when I told her that the worn, 20-leaf notebooks were valuable. “Auntie, I am a village girl,” she said, using a common form of address. I pressed her to retrieve the documents from the Nigerian security agents who had taken them as part of their investigations into Boko Haram, and then with her permission shared the news of their existence in articles for the Thomson Reuters Foundation. (Later, my interviews with her and other freed girls formed the basis of my young-adult novel “Buried Beneath the Baobab Tree.”) A new book, “Bring Back Our Girls,” by Wall Street Journal reporters Joe Parkinson and Drew Hinshaw, features excerpts from the diaries.

Adamu, now 31 and the oldest among those kidnapped, and a handful of the other girls began chronicling their experiences after a few months in captivity, when the militants gave them notebooks for their Koran lessons. They would sit in a group and recall as many events as they could from the night they were taken until the present time. Some girls wrote while others narrated. Some girls handed the pen over to others when they were tired. They hid their diaries in holes in the ground and in their underwear.

Collaborating to write diaries is a time-honored technique not specific to the Chibok girls. Alexandra Zapruder, who has aggregated young people’s Holocaust diaries, told me about a boy named Ilya Gerber in the Kovno ghetto in Lithuania. Ilya described how he had been trying to recall a terrible roundup, and he borrowed his friends’ diaries to help him with his account. “He wrote that he had encouraged them to write diaries and that they were all sharing their notebooks with each other,” Zapruder said. Several pages in a diary by a girl named Elsa Binder in Stanislawow, Poland, were written by a friend who added an account of her own life. “Writing diaries together, collaborating and sharing information, filling in gaps to create a whole account, is not terribly uncommon,” Zapruder said.

There was so much else that these poorly educated girls from rural Nigeria could have done with their time, but they chose to defy the risks and chronicle their experiences. Their notebooks are riddled with poor spelling and breathless, unending sentences transcribed in a free-flowing form. An entry describing punishment for girls who attempted to escape reads in part: “. . . she came out then they told her to cut one if not they are going to cut her own neck then she said she can’t then they tied her two hands then we are begging them we are crying then they said If next we ran they are going to cut off our neck so­ . . .”

The girls recorded their nicknames for the militants who watched over them and jested about the men’s idiosyncrasies, such as the peculiar ways they spoke. Diary entries show that many of the majority-Christian girls resisted attempts to convert them to Islam, even when their captors threatened to douse them with gasoline and set them on fire. They also resisted forced marriages, even when they were pressured with beatings and denied food. “Every day, they beat us,” Adamu told me. “We were slaves.”

Bouts of illness had caused Adamu to miss chunks of schooling over the years, making her older and less literate than her classmates. Her best friend, Sarah Samuel, now 24, did most of the writing in the two main notebooks that the young women filled, while Adamu did most of the narrating. A sentence beginning, “Me Naomi Adamu I did not eat for three days,” which described her refusal to take meals offered by the militants during her early days in captivity, was written in Samuel’s hand. Samuel succumbed to pressure and married one of her captors. More than 100 Chibok girls have yet to be reunited with their families seven years after they were stolen. None of the 103 young women freed as a result of the negotiations had married; an additional four who had wed were found by the Nigerian military. “I keep thinking about her,” Adamu told me of Samuel. “I hope she will come out one day.” On the cover of one diary, Samuel had inscribed the word “Me” on an image of Cinderella. On the last page, she had listed the names of her parents and five siblings, unaware that her mother had had a seventh child in her absence.

The militants eventually discovered that the girls were scribbling away and commanded them to give up their notebooks, then burned them to ashes. Adamu defied this order and continued to hide hers. She looked forward to being released someday, she told me, and was keen for her family to read what she had been through. “For remembrance.”