Authorities at San Francisco International Airport are struggling to deal with rising numbers of homeless people arriving at the International Terminal, many of them seeking shelter in the middle of the night after riding BART trains south from the city.

It’s the latest expression of the region’s increasingly visible homelessness crisis and represents another challenge for BART, which is dealing with the pending retirement of its general manager and police chief, the complex rollout of a new fleet of trains, and this week declared a state of emergency over surging crime, rampant fare evasion and “quality of life” issues.

In the past two years, airport duty managers and San Francisco police officers who patrol SFO have seen official contacts with homeless people triple, according to airport figures obtained through a public records request. There were 1,139 such calls in February, or roughly 40 a day, compared with about a dozen contacts a day in March 2017.

The records do not specify how the person arrived at the airport, which sits east of San Bruno and Millbrae in San Mateo County, or describe the result of the encounter.

But airport officials noted that a large percentage of these unsheltered people arrive on the last BART train each night, which pulls into the International Terminal after 1:30 a.m. and empties out, with no return run to San Francisco. At that time, the terminal is mostly empty — departing flights have ceased — and airport officials said the arrivals raise security concerns.

On March 27, records show, San Francisco police officers had 33 contacts with homeless people at SFO, all at the International Terminal area by the BART station. Nineteen of those contacts occurred during the midnight shift.

From 10 p.m. to 6 a.m. every day, the airport allows only employees, ticketed travelers and people dropping or picking up fliers to be in the terminals.

“Bottom line, this particular arrival at night is an area of focus as a disproportionate number of riders on trains are homeless,” SFO spokesman Doug Yakel said. “We’ve been working with BART to examine where trains terminate for the night, and we’ve also requested that BART sweep trains for homeless before they arrive at SFO.”

While Yakel said the majority of the contacts with homeless people stem from the final train each night, BART officials disagreed. They said perhaps four or five homeless people are typically encountered each night at the airport, which is consistent with other end-of-line stations like those in Richmond and Fremont.

“I don’t think there’s any doubt that these people don’t have any permanent housing and they end up at SFO,” said Jim Allison, a BART spokesman.

A BART police officer does a sweep through the last two trains of the night, along with the train operator, when they reach SFO, Allison said. SFO employees and San Francisco police officers assigned to the airport also screen people coming off those trains, asking them where they are headed, and respond to homeless people who sometimes make their way into the terminal.

Armando Sandoval, the BART police crisis intervention team coordinator, said officers typically find people at the end of line, often asleep.

“I think it’s typical of migrating homeless. It could be buses, trains or subway trains,” Sandoval said. “They spend time on the trains and forget where they are and end up at the end-of-the-line locations.”

BART does not allow people to remain on trains when they are out of service — and with the airport’s isolated location, there isn’t an easy exit, officials said. Currently, San Francisco police hand out tokens for a free bus ride on SamTrans, which has 24-hour service to SFO and connects to locations from Palo Alto to San Francisco.

During the day, many homeless people contacted at the airport are provided BART passes.

“The notion of pulling them off a BART train and putting them on a SamTrans bus is not solving the problem, it’s just shifting it,” Yakel said. As a result, he said, the airport and BART are working with San Mateo County homeless services agencies to try to get help for individuals.

The phenomenon has intensified as the transit agency deals with an estimated $25 million-a-year fare evasion problem. On Monday, BART began a monthlong enforcement blitz to attack it. Three days later, General Manager Grace Crunican shocked the board of directors when she announced she’d be leaving the agency in July after running BART for seven years.

Complicating the airport problem, BART can’t ticket fare evaders at the six San Mateo County stations — the airport, Daly City, Colma, South San Francisco, San Bruno and Millbrae — because the county opted out of the system back in 1961. The transit agency cannot enforce internal ordinances south of San Francisco.

Other Bay Area transit agencies also see homeless people seek shelter on late-night runs. The Valley Transportation Authority’s overnight Route 22 bus line — or “Hotel 22,” as it has been called — offers a warm, safe space for the desperate to sleep as the coach rumbles around Santa Clara County.

The records obtained by The Chronicle show that the number of SFO contacts swells significantly during the rainy, colder winter months.

In dozens of official complaints to BART involving the SFO line dating back a year, also obtained through a public records request, irate passengers complained about a range of things relating to apparent homeless people, including foul smells, drug use, masturbation and panhandling. One woman said in March she had watched a woman shoot up drugs on a platform bench with the help of friends after leaving SFO.

“I’ve lived in the Bay Area my entire life and find this to be a terrible ‘welcome’ for visitors taking public transportation from the airport,” she wrote. “If I were experiencing these conditions in another city, I would feel extremely unsafe, not to mention finding it difficult to rationalize why I paid $10 one-way to use this service.”

Employees and vendors in the International Terminal said they regularly see homeless people crashed in chairs, both in the upper departure area and in the cramped and crowded arrivals lobby below. Some people will spend entire days in the terminal, but most of them show up late at night or very early in the morning.

A few homeless people are regulars, including one man who has essentially lived in the terminal “for years,” said an airport employee who did not want to give her name. He spends his days mostly near the United Airlines counter on the lofty, sunlit departures level.

Another regular visitor is a woman in a knit hat who tends to stay in a corner of the arrivals area. On a recent afternoon, she was sitting alone with a few plastic bags piled in a seat next to her, tucked away from the bustle of arriving international travelers and their waiting friends and family. She declined to be interviewed.

The San Mateo County Homeless and Safety Net Team said that while it was asked to provide services by the airport, more housing is needed to address the core problem.

“There is now a process in place to have homeless outreach services provided at the airport on an occasional basis,” the agency told The Chronicle. “Our understanding is that the airport is continuing to assess the situation regarding people who are experiencing homelessness who spend time at the airport, and the Human Services Agency has and will continue to participate in discussions with the airport and other stakeholders to learn more about the situation.”

Sandoval said BART is working with the airport and homeless advocates to create a task force and outreach plan. He said the airport is by no means alone, citing the Pittsburg-Bay Point terminus as an even larger problem.

“Right now, it’s a Bay Area-wide challenge. Right now, there are a lot of people displaced,” Sandoval said. “Homeless encampments get shut down, and the trains become part of the migrating homeless.”

Chronicle staff writer Erin Allday contributed to this report.

Matthias Gafni is a San Francisco Chronicle staff writer. Email: matthias.gafni@sfchronicle.com Twitter: @mgafni