EDGARTOWN — In an emotional farewell Friday, the roughly 50 Venezuelan migrants flown unannounced to Martha’s Vineyard on Wednesday in what critics derided as a cruel political stunt by Florida Governor Ron DeSantis left the island for temporary housing on Cape Cod.

Just before 10 a.m., one large bus and two smaller ones from the Martha’s Vineyard Transit Authority pulled in front of St. Andrew’s Episcopal Church to a crowd of families waiting in the driveway with backpacks and suitcases.

The teary-eyed migrants hugged volunteers, took selfies, and gave the church — which had doubled as an emergency shelter for them — a round of applause before embarking on the next stretch of their journey to Joint Base Cape Cod in Bourne, which Governor Charlie Baker’s office said Friday was being offered as temporary shelter.

For one 27-year-old, the trip to Massachusetts was long.

“From Venezuela. From Colombia to the jungle. Panama. Costa Rica. Nicaragua, Honduras. Guatemala. Mexico. All the way to the United States,’’ the man, who did not provide his name, said in Spanish.

After such an arduous journey, the man said he felt “fooled’’ by the offer to relocate to Massachusetts from a migrant facility in Texas that was arranged by DeSantis.

“We got here without any comfort, I’m telling you without [any]. What we saw was a political gesture,’’ he added. “It is true that it is absolutely brutal for us, because we are trying to get out of it.’’

State Senator Julian Cyr, a Democrat who represents the Cape and Islands, attended a meeting in Boston Friday morning with other government officials who were briefed on preparations being made at the base.

That included medical teams, portable cell reception units, and items such as iPads so people could video call into virtual court hearings. Legal teams were being set up to help with their cases.

“This is a full mobilization effort,’’ Cyr said.

Baker’s office said the Republican governor was prepared to mobilize up to 125 members of the Massachusetts National Guard as part of the relief effort.

The individuals and families will be housed in dormitory-style spaces on the base, which is designated as an emergency shelter in Barnstable County, with separate spaces accommodating solo travelers. Families will not be separated.

“We are grateful to the providers, volunteers and local officials that stepped up on Martha’s Vineyard’’ to offer assistance, Baker said in a statement.

The base, officials noted, has previously housed and cared for displaced individuals, including Louisiana residents affected by Hurricane Katrina in 2005.

At around 11 a.m., the migrants departed the shuttle buses and boarded a Yankee charter bus, which rolled onto a freight ferry at Vineyard Haven for the trip to Woods Hole and the Joint Base.

During the ferry ride, migrants took in the view of the ocean, which glimmered and sparkled under the sun and clear blue sky. They took photos on donated Motorola cellphones and called family back in their home countries.

Some propped their children onto the side of the ship so they could see. Others smoked cigarettes, even though they weren’t supposed to. Rafael, 23, climbed up on a side railing and smiled a wide, braces-adorned smile. He took a selfie.

Another migrant, a 27-year-old man named Pablo, watched the coast line fade as he remembered his whirlwind stay in Edgartown.

“It was very warm, very kind, very collaborative, very kind-hearted,’’ he said in Spanish. The volunteers “helped me. We started as political pawns in the middle of a political game. . . . I understand that they don’t want immigrants in Texas and Florida. However, human life is not a game.’’

He said he was impressed with how the Massachusetts authorities quickly got the group the help they needed.

“It is a great country, with many opportunities, and we come to add, to try to be part of society,’’ Pablo said.

Earlier Friday, Patrick and Polly Toomey were hard at work at their waterside cafe in Edgartown, Among the Flowers preparing breakfast for the migrants.

“All I knew was, Pat, you’re making breakfast,’ ’’ Patrick Toomey said. “It’s nice to do things for the community. That’s the thing about Martha’s Vineyard, if somebody is sick or somebody is hurting, even if you don’t know the person, the Vineyard jumps in.’’

The migrants arrived on Wednesday on two planes that DeSantis said were part of his state’s $12 million “relocation program’’ to take undocumented migrants to so-called sanctuary destinations in blue states such as Massachusetts, New York, and California.

The Toomeys — longtime Edgartown residents who have run the restaurant for more than two decades — sprang into action Thursday morning after Polly Toomey walked by St. Andrew’s Episcopal Church, which hosted the shelter that housed the migrants. She gave her number to Lisa Belcastro, shelter coordinator for Winter Homes, in case she needed any help.

“They won’t be hungry today,’’ Patrick Toomey said Friday.

Baker’s office said the Massachusetts Emergency Management Agency is working with other state agencies and nonprofits to ensure the migrants have access to a broad range of services.

As they do in any comparable emergency situation, state officials will deploy a “wraparound’’ service approach including shelter, clothing, and hygiene kits, nutrition, and access to health care, mental health, and crisis counseling, the statement said. All services will be available in the recipient’s native language through interpreters, officials said.

Separately Friday, Lawyers for Civil Rights, a Boston-based advocacy group, said its team of pro bono attorneys and allies was helping the migrants navigate the immigration process and are documenting their painful experiences.

“The stories our clients tell are heartbreaking — and infuriating,’’ the group said in a statement, adding that it is “exploring legal options — civil and criminal — to hold the responsible parties accountable.’’

Immigration lawyers and other legal advocates questioned whether a crime was committed in moving the migrants, based on reports that they were lured into taking the plane trip under the pretext that their immigration paperwork would be expedited, and that they would have jobs at their destination.

On the ferry, one migrant, Enrique, 36, said he traveled to the United States with “just me and God.’’

While he traveled through Mexico, he said, he was kidnapped and tortured, pointing out scars on his face and neck. He eventually recovered in a shelter. Now, he said Friday, he wants to stay in Massachusetts.

Speaking while smoking a cigarette on the back of the ferry, Enrique said that if he had the chance, he’d return to Edgartown.

“If they give me the opportunity to come back for more, I’d stay and work here,’’ he said.

After he arrived at the base, Enrique said Friday night that he saw a nurse and that a doctor will see him in the next few days. He also said that he is talking with lawyers, and that the base is clean and comfortable.

“God continues to fill me with blessings,’’ he wrote in a text message.

Speaking to CNN, Senator Ed Markey, a Malden Democrat, blasted the relocation of the migrants to the Vineyard, adding that Massachusetts over the past year has taken in thousands of Afghan and Ukrainian refugees.

“So, we’re going to welcome people,’’ Markey said. “We’re going to take care of people. But if they want a solution, then come to the table on a comprehensive immigration bill, which [Republicans] have refused to do for nine years since 2013.’’

Travis Andersen and Matt Stout of the Globe staff contributed.

Samantha J. Gross can be reached at samantha.gross@ globe.com.