The surprise arrival of dozens of migrants on Martha’s Vineyard prompted pledges of aid from the state’s elected leaders, along with harsh rebukes from Democrats in the Legislature for the politicking that sent them here.

Martha’s Vineyard residents, service providers and local and state officials scrambled to respond Wednesday afternoon after around 50 men, women and children, mostly from Venezuela, landed on the island on a flight arranged by Florida’s state government that originated in San Antonio, Texas.

U.S. Rep. Bill Keating, a Democrat who represents Martha’s Vineyard, said people are now trying “to deal with a situation that was manufactured by and fueled by the ambition of the governor of Florida, who envisions himself as president and is leveraging this for his own political advantage.”

Keating said “people should be outraged” by the move and that Florida Gov. Ron DeSantis presents “an enormously different comparison to the governor of our state, another Republican.” He said Gov. Charlie Baker “acted very quickly and continues to help.”

At the State House, Senate President Karen Spilka called it “disgusting and abhorrent that an out-of-state governor has decided to engage in what is tantamount to a form of human trafficking for pure political games.”

Spilka said the Senate will “work with all parties to find long-term solutions” and continue to support the immigrants.

“This craven and divisive decision from out-of-state Republicans to use immigrant children and families as political pawns, is not merely cruel, but is at odds with American values,” House Speaker Ron Mariano said in a statement Thursday. “In the absence of federal immigration policy that has allowed for this inhumane stunt from officials in other states, Massachusetts will continue to be a welcoming place for immigrants.”

Baker said the state “has many resources for assisting individuals that arrive in Massachusetts with varying immigration statuses and needs and is working with all partners involved to make sure those resources are available to the migrants that arrived last night.”

In a statement that did not address how or why the group arrived in Massachusetts, Baker thanked everyone who came together to help on Martha’s Vineyard and said his administration is exploring setting up temporary shelter and services at Joint Base Cape Cod.

Attorney General Maura Healey, too, is “in touch with state and local partners to offer support and resources as needed,” according to a spokesperson for her office.

Healey is the Democratic nominee for governor, and her campaign referred an inquiry about the situation on Martha’s Vineyard to the AG’s office. Her opponent in the race for the state’s top job, Republican Geoff Diehl, laid blame with the federal government, which he said has failed to address “a crisis at America’s southern border.”

“As a result, states across our nation are dealing with an influx of illegal immigrants that they are not equipped to handle and should not be forced to accommodate,” Diehl said in a statement. “When that happens, governors naturally seek alternatives to protect the people of their state.”

The governor’s race is on the ballot this November along with a question seeking to repeal a state law passed earlier this year that would make immigrants without legal status eligible to apply for driver’s licenses. Diehl and Baker have both voiced support for the repeal effort, and reactions to the migrants’ arrival could turn up heat around that debate.

A spending bill Baker signed in April included $10 million for refugee and immigrant resettlement efforts, money lawmakers allocated in part as a response to the war in Ukraine. It’s possible they could add more funding or dedicate other resources in another spending package that’s pending before the House Ways and Means Committee.

State Sen. Julian Cyr, a Truro Democrat, likened the situation to the “Reverse Freedom Rides” of the 1960s, when segregationists tricked Black families into relocating to Hyannis as a way to retaliate against white liberal Northerners.

“That plot failed,” Cyr said. “The people of Hyannis welcomed these 96 Black families, helped them settle on Cape Cod, make a life, and these people are part of our community and have continued to be.

“This is just the cruelest political ploy you could imagine, right? Where it appears that these politicians have engaged in human trafficking to exploit families who are simply seeking a better life,” Cyr added. “If Ron DeSantis and his cronies cared about states like Massachusetts helping with the migrant crisis, this isn't the way to do it, right? You work in coordination.“

State representatives from Sunderland to the North Shore offered their communities’ support to Martha’s Vineyard over social media.

House Minority Leader Brad Jones, a North Reading Republican, said he doesn’t agree with DeSantis’ decision but can “understand the frustration that states are feeling at the complete and utter failure of Congress to pass comprehensive immigration reforms.”

“The lack of action at the federal level has resulted in an unacceptable patchwork of policies that vary significantly from state to state, which is not sustainable in the long-term,” Jones said. “That being said, it's important to remember that we are a nation of immigrants, and as such I firmly believe that Massachusetts needs to show compassion for these individuals and provide humanitarian aid and support.”