LOS ANGELES — As U.S. refugee resettlement agencies and nonprofits nationwide gear up to help Ukrainians fleeing the Russian invasion and war that has raged for nearly six weeks, members of faith communities have been leading the charge to welcome the displaced.

In Southern California, pastors and lay individuals are stationing themselves at the Mexico border waving Ukrainian flags and offering food, water and prayer. Around the country, other religious groups are getting ready to provide longer-term support for refugees who will have to find housing, work, health care and schooling.

Aaron Szloboda, an assistant pastor at the Christian church Calvary San Diego, recently spent 50 hours straight at the Mexican border handing out food and water to Ukrainians lined up to enter the United States.

Just 10 minutes from the frontier, Calvary San Diego has become something of a hub for newly arrived refugees, a place where they can recuperate after a harrowing journey and plan their next steps.

On Friday its walls were lined with snacks, beverages, dolls and stuffed animals as families arrived clutching duffel bags, suitcases and the hands of small children. They were welcomed inside to rest, eat a meal and check their phones. Volunteers helped them navigate their immediate individual needs: information on flights to New York; how to change euros to dollars; a ride for a friend who had just walked across the border.

Szloboda, whose Hungarian Jewish grandfather survived the Holocaust and lost family members to Nazi genocide, believes he is being called to serve those in dire need: “They’re exhausted physically and mentally.”

The U.S. has agreed to accept up to 100,000 refugees from Ukraine, which has experienced a flight of more than 4 million people since late February. The Biden administration is also expected to end pandemic-related asylum limits at the U.S.-Mexico border on May 23, caps that have drawn criticism from immigration advocates.

But even before such refugee resettlements begin, faith-based groups have already been helping Ukrainians who have made their way to the United States. Some arrived directly on travel visas. Others traveled to Mexico and then to the U.S. border to claim asylum, enabling them to stay in the U.S. while their cases are processed.

Refugee resettlement agencies can use all the help they can get to accommodate the influx. Deep cuts during the Trump administration led them to slash staffing and programming, and they have already been scrambling to help tens of thousands of Afghans seeking asylum after fleeing last year’s Taliban takeover.

“We’ve started dealing with these crises before there has been a chance to rebuild that infrastructure,” said Stephanie Nawyn, associate professor of sociology at Michigan State University who focuses on refugee issues.

“Refugees have a lot of needs — homes, jobs, English classes, financial assistance, schools and translators who will help them navigate all of that. That’s too much even for a large organization,” Nawyn said. “While getting more people of faith to help is great, not having enough resources or case managers is still going to be a problem.”

Swiftly providing those kinds of protections and benefits to Ukrainian arrivals is a religious imperative, said Mark Hetfield, president and CEO of the Jewish refugee agency HIAS, one of nine groups that contract with the U.S. State Department on resettlement.

Jewish people are called by their faith to care for and help people in need, Hetfield said, noting that “welcoming the stranger” is mentioned 36 times in the Torah, more often than any other commandment.

“Not because it’s the most important but because it’s the easiest one to forget or ignore — to love the stranger as yourself,” Hetfield said.

HIAS is also welcoming interfaith efforts to help newly arriving refugees, such as one planned partnership in New York City with Buddhist groups.

Columbia University doctoral student Chad DeChant, who belongs to Village Zendo, a Zen community in lower Manhattan, initiated that effort. The group is forming committees to help refugees navigate social services, and once their application to HIAS is approved, they hope volunteers can get trained by the resettlement agency.

Buddhism teaches its adherents to be aware of “the interdependence of all beings,” DeChant said, and “the teaching is to not see ourselves as separate from others: Acting compassionately to help others is a core value in all Buddhist traditions.”

Minda Schweizer, founder and executive director of Home for Refugees, a Christian nonprofit based in Orange County, California, said resources are sorely needed at the local level where faith-based groups continue helping Afghan refugees who are still finding their way.

“Many Afghan refugees are still in motels because we’re in the midst of a housing crisis,” Schweizer said.

Matthew Soerens, the U.S. director of church mobilization and advocacy at World Relief, said his organization is eager to welcome more Ukrainians and he has been busy fielding queries from churches about ways to help: Can they host a family? Can they be involved with English tutoring?

“One of our big asks of churches is, ‘Can you help us identify landlords or property managers?’” Soerens said. “What we are really struggling with almost everywhere in the country is long-term, permanent, affordable housing.”

Meanwhile, as Ukrainians keep arriving at the U.S.-Mexico border, local churches continue to step up.

Bogdan Kipko, pastor at Forward Church, a Baptist congregation in Irvine, California, has been working with churches such as Calvary as well as one Russian church in the San Diego area. Volunteers have been taking refugees to nearby hotels or hosting them in their own homes; after a short stay, those with relatives in the country typically then travel by bus, car or plane to places like Sacramento, where there is a large Ukrainian community.

The bigger challenge will be to connect those in need with long-term services and help them build new lives, Kipko said: “We’re trying to help those who have no place to go. We’re thinking about their long-term needs.”

Kipko and his family arrived in the United States in 1992 after fleeing religious persecution in Kazakhstan, and many of his relatives hail from Ukraine.

“We came here as refugees, and Baptist churches in Washington helped us get on our feet,” he said. “I’ll never forget that.”

Henao reported from Princeton, New Jersey. Associated Press writers Mariam Fam in Cairo, Peter Smith in Pittsburgh and AP photographer Gregory Bull in Chula Vista, California, contributed.