AUBURN, N.H. — They walked for miles through the woods, the girls in bonnets and long skirts, the boys in suspenders and broad-brimmed hats, towing heavy wooden handcarts. They slept in a field under tarps in a torrential downpour, and in the morning, they ate oatmeal in sodden clothes among the mosquitoes.

“It was awesome,” said 17-year-old Ida Mweze of Worcester, smiling serenely. “We were singing songs, and it kept us going.”

About 120 Mormon teenagers from the Boston area Saturday completed a three-day historical reenactment that has become a coming-of-age rite in many Mormon communities across the country: a commemoration of the Mormon pioneers’ flight from religious persecution in the Midwest to the Salt Lake Valley in the mid-19th century.

The excruciating trek across the Great Plains, through the Wasatch Range, and into the arid expanse of the Salt Lake Valley remains a defining narrative of Mormon identity and spirituality. The migration began in 1846, when the Mormons abandoned their city of Nauvoo, Ill. — then nearly the size of Chicago, with a population of about 11,000 — after anti-Mormon sentiment escalated and the Illinois government expelled them.

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

As Mormons see it, their exodus marked them as a people who redoubled their commitment to each other and to their faith in the face of oppression, who sacrificed dearly for their beliefs, and whose resourcefulness and resilience ultimately brought them to a new home in Utah.

WENDY MAEDA/GLOBE STAFF

Bryn-Morgan Rhodes (left) of Worcester and Guinevere Woolstenhulme of Framingham, carrying her daughter, Mimi, pulled a wagon Friday along the Fire Trail in Auburn, N.H.

“It was a real faith-testing experience for early pioneers,” said Kevin Rollins, president of the Boston Stake, a geographic province akin to a diocese.

Youth reenactments are one answer to a challenge facing contemporary leaders of the Church of Jesus Christ of Latter-day Saints: how to keep the memory and meaning of the pioneers’ trek alive in successive generations, particularly for those who have grown up far from the mountainous West, and for converts who cannot trace their lineage back to those early “Saints.”

“Community, sacrifice, and service are still hallmarks of the faith — but to a large extent, those traditions are grounded in a collective memory of shared trials,” said Terryl Givens, a professor of literature and religion at the University of Richmond. “The LDS leadership is clearly committed to fostering a vibrant memory of the pioneer experience for that reason.”

He said the pioneers are also celebrated in Mormon hymns, pageants, and Sunday school lessons; the treks, he said, “are more a ritual of remembrance than a historical reenactment.”

The Boston Stake youth began their trek at Massabesic Lake, at the edge of Manchester, N.H., and followed fire roads and other trails through the verdant forest to the east. Wyoming it was not, but it was message, not geography, that mattered.

“We’re not just camping in the woods in old-fashioned clothes for three days,” said Susie Keenan, 17, of Natick. “The point is really that we can follow the Lord.”

“To grow as a church family,” added Isaac Amesimeku, 17, of Rutland. “To become closer together, to experience a fraction of what the pioneers experienced.”

The journeys, which Rollins said the Boston stake has done every three or four years for a decade or so, involve daunting logistical preparation, from obtaining permission to travel across private land to arranging for drop-off and collection of portable toilets each day. Many of the girls wore hand-sewn skirts and bonnets, and church members made dozens of loaves of homemade bread for meals.

The handcarts — replicas of those used by the many Mormons who were too poor to afford a horse-drawn wagon — were built by church members in Boston, using wheels from a company that makes buggy wheels for the Amish, said Spencer Shearer, leader of the trip.

‘We want to find a way for them to connect to these stories so they’re personal.’ — Jonathan Austin, a leader of the excursion

The trek was not meant to replicate the conditions endured by the pioneers, many of whom died of starvation, exhaustion, or exposure. Shearer said he wanted all young people, not just the athletes and experienced hikers, to participate.

After sheeting rain drenched the party Friday morning, Shearer sent a three-quarter-ton pickup truck full of wet sleeping bags to be dried.

“I have a guy at a laundromat right now, feeding quarters,” he reported with a grin as the group stopped for lunch Friday.

Trip leaders supplied the travelers with excerpts of the vivid journals kept by the pioneers, along with booklets with meditations, questions, and space for the teenagers to write their own reflections. To Mormons, recordkeeping is sacred, an opportunity for spiritual insight and connection with generations through time.

One excerpt, from pioneer William R. Palmer, offers a window into the suffering he endured: “I have pulled my handcart when I was so weak and weary from illness and lack of food that I could hardly put one foot ahead of the other.”

Polygamy, officially abandoned by the church more than a century ago, played a contributing role in the conflict that led to the exodus from Illinois. On the youth trek, the topic is not a focus.

The young people planned to commemorate legendary scenes from the Mormon Trail, including a daring rescue in which three young men carried members of a stranded party across an icy creek, an act that cost them their lives after they fell ill from the exposure, leaders said.

“We want to find a way for them to connect to these stories so they’re personal,” said Jonathan Austin, who works for the church’s education system and who served as a leader on the trek. “There’s a rescue going on today; Jesus goes after his lost sheep all the time, and he usually uses us to go do it.”

Friday morning, the young women had to pull the handcarts by themselves for more than an hour while the young men were called away. This echoed Brigham Young’s decision in 1846 to encourage some 500 young men to leave the trail to enlist in the US Army, in a demonstration of Mormon loyalty to the US government. Afterward, Christopher Boyce, the stake’s first counselor, praised the teens for working together and staying cheerful.

The pioneers, Boyce said, “endured, and they endured, and when it was very tough, they got asked to do tougher things.’’

“Many of you will be the only ones in your school who wear modest clothing, and who choose not to do different things,” he continued. “How do you stand alone, not be judgmental, but stick to your guns and live the way God wants you to live?”

If there were an ideal teenage audience for such messages, the earnest young faces trained on Boyce might be it. For a group of high schoolers — for any group, actually — the young Mormons seemed remarkably bereft of attitude problems. There was almost no grumbling, sniping, or criticism as they plodded along through a cool drizzle, and during Boyce’s talk, they spoke of how they were inspired by one another’s efforts.

“I feel like I wasn’t just with my family; I felt like I was with everyone,” Keenan said, to nods.

The young people were organized into 14 “families,” each pulling a handcart, with an adult couple serving as the “Ma” and “Pa.” At night, the adults slept under the cart; the young people slept under tarps. The girls were on one side, the boys on the other. Each traveler brought a change of clothes, toothbrush, a sleeping bag, and little else. They collected litter along the way as a community service.

Guinevere Woolstenhulme, who helped plan the historical content of the trip, carried her 5-month-old daughter, Mimi, outfitted in period dress.

“You know, for these families, when they were kicked out of Illinois, life didn’t stop,” she said. “One of the journals I read was [by] a midwife who said she delivered 20 babies the first week.”

Some on the trip could trace their lineage to the original pioneers; others came from families who joined the church more recently. The metaphors did not seem out of reach for any of them.

Hantzly Murat, 18, of Needham, who immigrated to the United States from Haiti after the 2010 earthquake, said he sees his mother, who converted from Catholicism, as a pioneer. The trek, he said, “helps me understand the sacrifices my parents made to join the church.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.