It was a nice life, and by the sea.

When Nancy Morales moved to Hawaii from Mexico City more than two decades ago to escape crime and grinding poverty, she figured she would stay for a few years, make some money and go home. But after two children and a divorce, she couldn’t fathom being a single mother in Mexico, so she built a life on Maui, in the historic town of Lahaina.

It took two jobs, cleaning hotel rooms and making banana bread at a local bakery, and it meant living with the fact that she was undocumented. But she found a measure of happiness: peace, community, beautiful sunsets and an apartment near the Pacific Ocean.

Now even that modest bit of paradise is in jeopardy, after the wildfire that ravaged Lahaina in August and killed 99 people. As the wind-stoked blaze bore down, Ms. Morales barely survived the traffic-choked streets. She soon found herself living in the hotel where she worked. And for the first time in a long time, she felt the painful uncertainty of not being in the United States lawfully, which put some government aid out of reach and the risk of deportation fearfully close.

“You can start a new life in another place,” she has told her children. Many families are facing similar dilemmas as they wonder whether a future Lahaina will have a place for them.

It has been nearly three months since catastrophe stuck Lahaina, which was home to about 13,000 people. Nearly a third of the town’s residents are foreign-born — more than twice the rate in the rest of the United States, and substantially greater than that in Hawaii.

Lahaina’s story of immigration is almost as old as the town itself, dating back to missionaries in the 18th century and then waves of people from China, Japan and Portugal who came to work in the sugar cane and pineapple fields.

Today, they come from Mexico, El Salvador and Honduras, as well as the Pacific Islands and the Philippines. In Lahaina, they find jobs in the tourist economy, in hotels, on golf courses and in shops and restaurants.

“It’s human beings that clean rooms, that mow lawns, that do landscaping, and take care of elderly people and kids,” said Sonny Ganaden, a Democratic state representative from Oahu. Mr. Ganaden is a second-generation Filipino American who has been working with the immigrant community of Lahaina.

Many immigrants who are mourning loved ones also lost homes and the years’ worth of wages and tips they had stashed in them. They wonder where they will work and live in the short term, and many are considering leaving Lahaina.

“This is who runs this tourism-based economy,” Mr. Ganaden said. “So if we don’t support them, then we can’t get this economy back on track.”

Because many of those who perished or were displaced by the fire came from somewhere else, the shadow of grief extends to other countries.

On a recent morning, Mario Tomboc stood outside the police station on Maui, having flown in from the Philippines, where he works as an administrator at a Christian school for deaf students.

Mr. Tomboc, a diminutive man with a gentle demeanor, had come to retrieve the remains of his sister, Bibiana, 58, and his stepmother, Revelina, who was 81. The pair lived together in an apartment in Lahaina. Bibiana earned money selling crafts and souvenirs on Front Street and loved Lahaina for its low crime and tropical weather. They were happy, but hardly prosperous: Bibiana died with $200 in her bank account.

Mr. Tomboc left the police station carrying a simple silver ring that was found on his sister’s finger, along with a police report. He would bring the report to the Philippine Consulate to obtain papers that would allow him to bring his relatives’ remains back to the Philippines for burial near their ancestral home.

Mr. Tomboc, seeking closure, had asked to view the remains. “I want to see for myself, so I am preparing myself for that,” he said.

There is no official accounting of how many immigrants were killed in the fire, but more than a quarter of the dead had ties to the Philippines, according to the country’s consul in Hawaii, Grace Anne Bulos. Eight were Filipino citizens and 18 others were former Filipinos, including some who were naturalized U.S. citizens,Ms. Bulos said.

A few hours after meeting with the police, Mr. Tomboc stood outside the Ballard Family Mortuary, huddling with family members and holding up a phone showing another sister from the Philippines on the screen. He offered a prayer for acceptance, and asked that the family trust the Lord.

For a few moments, he was allowed to see the remains of his sister and stepmother. He said to himself: “Now I’ve seen you. OK, I love you and goodbye.”

Genesis Gil, who works with the organization Roots Reborn, which formed after the fire to help Lahaina’s immigrant community, said she was constantly told by clients, “If I can’t find a place to live, I’m going to have to move away.” Already, Ms. Gil said, some have moved to Oahu, the island that contains Honolulu, or California. Going back to a country of origin was “the last choice for a lot of families,” she said. “They came here to leave all that behind.”

Ms. Morales said the anxiety over what she should do was inescapable. “It’s killing me softly,” she said.

Her 21-year-old daughter, Ashley Angeles, had rebuffed her mother’s pleas for her to leave and make a new life elsewhere. “She was a single mother all my life,” said Ms. Angeles, who performs in a local dance troupe. “How am I just going to leave her?”

Still, she said, the family had not ruled out moving, perhaps to Las Vegas, which has a vibrant Hawaiian community. “We want to stay on Maui because this is where we were born and raised,” Ms. Angeles said. “But with the price of housing going up so high on the west side, we’ve just been talking that we might, if it comes down to it, have to move off island.”

Some of Lahaina’s Mexican residents have received offers of temporary work in California’s wine industry, with a free round-trip plane ticket to San Jose. Though the paycheck is enticing, Ms. Morales said, she is worried about traveling without legal status.

For other immigrants, the pain of losing loved ones made it impossible to think about the future. Sonia Jose Castro, who is from Mexico, narrowly escaped the fire with her daughter after being stuck in traffic for more than an hour. Her husband and cousin, who were behind them in another car, perished.

Ms. Castro, 35, cleaned houses for a living but has not worked since the fire. She said she was determined to stay, at least so her daughter, Yisell, could finish high school. “I miss my husband, my cousin,” she said. “It’s so hard.”

And the reopening of West Maui to tourists in recent weeks has added to the uncertainty for many immigrants. State and local leaders have allowed visitors to return in phases, which they said was necessary to revive the economy and help working residents. But that has also increased tensions on the island.

“How are they asking people from Lahaina to move out of hotels just for the tourists to come back?” Ms. Angeles said, noting that it had been especially painful to see tourists enjoying themselves while people were still grieving. “That’s not OK.”

Signs on the road to Lahaina echo that sentiment:

“Let Lahaina Heal.”

“Respect the Locals.”

“Patience, Prayer, Faith.”

On a recent Saturday morning, as tourists trickled into a nearby coffee shop or enjoyed the golf course or the ocean, Ms. Morales gathered with other Mexican immigrants at a beachside park near Lahaina.

They were there to mourn one of their own, a 14-year-old from Mexico named Keyiro Fuentes.

When the fire swept across Lahaina, Keyiro was at home. School was starting later that week, and his parents were away at work. He couldn’t escape.

Lisa L. Schell contributed reporting from Maui.