The governor of Florida signed a budget in June that set aside $12 million for a program to take unauthorized migrants out of the state. When it came to immigration, he said it was the highlight of the state's new spending.

In just three months, the money was being used in a place far from Florida, where it was being used to round up Venezuela's asylum seekers on the streets of San Antonio and send them to Massachusetts.

The flights carrying 48 migrants attracted international attention and drew condemnation from Democrats. Dozens of asylum seekers were dumped on the doorsteps of Northeastern Democrats who have resisted calls to crack down on immigration.

The mission that was carried out without the knowledge of the Texas governor, Greg Abbott, a fellow Republican, was paid for with state money in possible violation of the state law that allocated the money.

In the middle of it all, a woman with a background in military counterintelligence is believed to have been sent to Texas to fill the planes.

A migrant mother and daughter looked out across the water as they journeyed by ferry from Vineyard Haven to Woods Hole in Massachusetts.Credit...Matt Cosby for The New York Times

Until now, little has been known about the woman whom migrants said identified herself only by her first name, "Perla", when she asked them to join the flights. According to a person briefed on the San Antonio sheriff's office investigation, the person being looked at in connection with the operation is a woman named Perla Huerta.

According to military records, Ms. Huerta served in Iraq and Afghanistan before she was discharged in August.

A person who was working with Ms. Huerta identified her in an interview with The Times. According to Rachel Self, a lawyer representing the migrants, several of the migrants on Martha's Vineyard took pictures of her during the recruitment process in San Antonio. They were able to match those photos with others online and in social media belonging to a woman named Perla Huerta.

Attempts to reach her were unsuccessful.

The man who said he worked with her to sign up other migrants agreed to speak only if his name wasn't used because of the investigation. He said he met her outside of the Migrant Resource Center.

Card 1 of 5

The migrants were from somewhere. Many of the 48 migrants who were taken from a shelter in San Antonio to Martha's Vineyard planned to claim asylum. They were released after being taken into custody.

The migrants arrived on the land. The migrants were welcomed by volunteers and officials in Martha's Vineyard and given shelter at a church. The migrants boarded buses for a shelter.

The drop-offs are questionable. It is not illegal for a state government to pay for migrants to travel within the United States after they have been released from jail. The migrants who were taken to Martha's Vineyard filed a lawsuit against the state officials who lied about where they were going.

The claims are being looked into. I agree. The sheriff in Texas said that it was clear that many of the migrants had been deceived and lured away from Texas to score political points. The sheriff said that his decision to open the investigation was not political.

He was asked to help her find other migrants like him. She never mentioned that she worked for the Florida government. He admitted that he was also lied to. I wouldn't have gotten involved if I knew. She wanted to help people head up north.

The effort to fly migrants to Martha's Vineyard appeared to have been less organized than the more sweeping program created by Mr. Abbott in Texas that already had bused more than 11,000 migrants from the state to three northern states.

Both governors wanted to draw attention to the large number of unauthorized migrants who arrive daily at the southern border and force Democrats to deal with them.

In the case of the flights to Martha's Vineyard, Vertol Systems was paid $615,000 on Sept. 8 and $950,000 less than a week later. The first and second payments were made for project 1 and project 2. Only the initial flights have been acknowledged by Florida officials.

The money to fly migrants came from a special $12 million appropriation in the state's last budget, a brief item that gave funds to the state's Department of transportation to create a program "to facilitate the transport of unauthorized aliens from this state."

The goal of the program was to push back on the number of unauthorized migrants being flown into the state. The additional large groups of migrants that had been expected had failed to show up.

Most migrants first arrived in Texas.

Legislators raised objections. The rules of the game can't be complied with by the DeSantis administration. Mr. Pizzo wanted to stop the state from spending any more money on flights like that.

No state contracts detailing the spending have been made public, and little has been said about the role played by state transportation officials in arranging or coordinating the flights

Michael Barfield is the director of public access at the Florida Center for Government Accountability. There is a misuse of state funds according to me.

A migrant trying on a new pair of sneakers in front of St. Andrew’s Episcopal Church on Martha’s Vineyard.Credit...Matt Cosby for The New York Times

Vertol Systems is an aviation maintenance and training company that works for the U.S. government. The company has become more connected with Republican power brokers.

Court records show that Vertol was once represented by Matt Gaetz, who is now a Republican member of congress. According to information first reported by NBC News, Larry Keefe was one of the lawyers that the company used. Mr. Keefe is leading the fight against immigration.

Vertol and its leader, James Montgomerie, have donated to Republican legislators, including Mr. Gaetz, who led the Florida House Appropriations Committee this year.

Mr. Montgomerie did not reply.

The story of how the migrants were recruited for the flights was recounted by dozens of migrants in interviews with lawyers and journalists after arriving.

Most of them said that a woman named Perla contacted them in San Antonio about a free flight to Massachusetts.

They were told that there were jobs there. The migrants were given free meals at Mcdonald's and a place to stay at a nearby La Quinta Inn by a woman.

A map of the United States with an arrow stretching from Texas to Massachusetts was given to the migrants. There was a dot for the community services center on a map of Martha's Vineyard.

A fake brochure called "Refugee Migrant Benefits" was in the folder. There was a flag that was not current on the cover. The names and numbers of a synagogue and a church were listed on the back.

The pamphlet promised up to eight months of cash assistance for "income-eligible" refugees in Massachusetts, apparently mimicking benefits offered to refugees who arrive in the United States through the country's official resettling program.

Carlos Guanaguanay, left, in front of St. Andrew’s Church on Martha’s Vineyard this month.Credit...Matt Cosby for The New York Times

"We were tricked in Panama, Costa Rica, Nicaragua, Mexico, and then in the United States," said Carlos, who was approached by a woman called Perla while walking in the aisles of a supermarket in San Antonio.

She made him an offer he couldn't refuse after he told her he was looking for a job.

He said it took him a month and 20 days to get to the U.S. border, with little food and nowhere to sleep, and he jumped at the promise of transportation to a place where he would be cared for and offered a job. The man said that they can work at anything. We're here for our family.

The people who signed up were flown from San Antonio to Crestview, Fla. The migrants weren't going to leave. After stopping in South Carolina, the flight headed to Martha's Vineyard.

Several migrants said in interviews that they were taken in vans that had been waiting for them and deposited at a community center where they were told to knock on the door. The woman who answered didn't know who they were and didn't speak Spanish.

When the migrants found out that they were surrounded by water, it was terrifying. It was not possible for some to find a bridge.

The chief executive of Martha's Vineyard Community Services was talking to a senior staff member in her office when they saw a group of people walking outside.

A group of migrants stayed at the Migrant Resource Center in San Antonio before being sent to Martha’s Vineyard.Credit...Matthew Busch for The New York Times

She said that the people looked like they were looking for help. She asked what they need.

She rushed in for help from a manager who spoke Spanish because she didn't know what she was talking about.

People from the flights gathered in the parking lot.

The aid group workers didn't know who to ask. What happened to get you here?

They were promised that the community service organization would help them with housing and jobs.

The migrants received items from a thrift shop. Stores gave underwear. People who wanted to help called the hotline. The migrants slept on cots in the church after receiving donations and volunteers.

Most of the migrants ended up at a military base on Cape Cod. Few knew what would happen next.

The staff at the community center in Martha's Vineyard arranged for a migrant to return to Venezuela. He looked like he was broken.

He told his wife that they were deceived. She lied to us. She said something that wasn't true.

Mike Baker and Frans Robles contributed to the report. Beachy was involved in research.