When 18-year-old Ernesto Rubio graduated from high school in June, he knew what he wanted to do next: take a summer class in the basics of becoming an emergency medical technician, the first step toward his dream job as a paramedic.

The challenge? Getting to the class.

Rubio, the first in his family to go to college, couldn’t afford the $40 for a monthly bus pass, so he walked the three miles from his home in Whittier, Calif., to the fire academy where the course was held. It took nearly two hours for him to trudge through an industrial area with few sidewalks, a distance that would take a few minutes in a car.

“All my courses are in-person and hands-on, so I need to be here every day, all day,” he said. “It was a struggle waking up three, four hours before class starts just to get here on time.”

Sometimes the weather was “brutal,” Rubio said, with the temperature reaching as high as 110 degrees by the time he had to walk home. “It was just like being in a sauna but with a heavy backpack.”

At a time when colleges are increasingly focused on how to get and keep students enrolled and on a path to a degree, some of the most surprising challenges are not academic but logistical. Something as simple as affordable, reliable transportation can mean the difference between a student finishing college or not.

While students on residential campuses are figuring out the logistics of traveling home for the winter holidays — and when states and cities soon will be deciding what to do with their shares of the massive federal infrastructure bill — the vast majority of U.S. college students are commuters, many of whom struggle with getting to and from their classes on a daily basis.

Transportation can account for almost 20 percent of the cost of college for commuters, according to the College Board; 87 percent of all first-year students live off campus, the nonprofit Higher Learning Advocates estimates.

Community college students will spend an average of $1,840 on transportation during the 2021-22 school year — more than their counterparts at public and private four-year colleges — the College Board reports.

There are four ways transportation poses barriers for students: because of the cost; because stops or stations aren’t close enough to where they live or work; because available routes and times don’t sync with college schedules; and because it’s unreliable, one study found.

Transportation barriers disproportionately affect low-income students and Black, Hispanic, Native American and some Asian students. Hispanic students were 19 percent more likely to report transportation problems as creating a barrier to college completion than non-Hispanics, according to a study by the University of North Carolina at Chapel Hill and UnidosUS.

The study called reliable transportation “often the single thread holding together a precarious balancing act that allows the student to attend school while juggling multiple other responsibilities.”

When he was a student at Oakland Community College in Michigan, Preston Welborne estimates that he spent six hours a day riding a bus, making several transfers to get to and from the campus.

“You feel like you’re being less productive to spend more time traveling versus being wherever you need to be,” he said. “It eats up a lot of your day.”

Welborne — now a film, television and media major at the University of Michigan, to which he transferred in the spring — said he hesitated to tell professors why he was sometimes late to class. “It happened so often, you don’t want to sound like you’re making excuses,” he said.

He always had to give himself an extra hour as a buffer, Welborne said, “cause you never know. I can’t even count how many times I was late for something because of the bus.”

Ernesto Rubio probably wouldn’t have been able to continue his education if his college, Rio Hondo, hadn’t offered a free transportation pass to all students this fall. With the GO RIO pass, “I’m able to get to school at a reasonable time,” he said. “And I’m able to stay later than usual and stay till dark if needed and get help because I still know I have safe and reliable transportation.”

Bipartisan legislation in Congress proposes to make grants to improve public transportation near campuses that serve low-income students and subsidize fares.

“It’s still too hard for too many students to get to school,” said one of the principal sponsors, U.S. Rep. Conor Lamb (D-Pa.).

Some colleges are also starting to respond. American University in Washington, D.C., has offered a transit pass since 2016. Students pay a mandatory fee of $136 per semester for unlimited rides on Metro subways and buses. George Washington University, also in the nation’s capital, recently announced it is also joining the University Pass program.

A few others also fund transportation passes with student fees or by using federal pandemic relief dollars.

In September, Chattanooga State Community College in Tennessee launched a pilot program in partnership with the local transportation authority that will let all students and college employees ride the bus free through August. The college spent about $35,000 of its federal coronavirus relief funding on the program, according to Amanda Bennett, interim vice president for student affairs.

Bennett said the college will collect data about how many students and employees use the service, in the hope of continuing it beyond next year.

Los Angeles is also launching a pilot program this fall giving K-12 and community college students unlimited Metro bus and train rides without charge. The transit board for the neighboring city of Long Beach approved a similar program in November.

Some community colleges have addressed the transportation barrier by bringing the education closer to students.

Valencia College in Orlando operates several centers at which students can earn certifications in industries such as manufacturing, welding and construction. The college has located the centers in places close to public transportation but where there are few educational opportunities.

Students in rural areas face different kinds of transportation barriers. Sophie Goodman is a senior studying sociology at the State University of New York at New Paltz, about 85 miles north of New York City. She said that neither the local transportation system nor her 2004 Prius with 189,000 miles on it are reliable.

“I am a working-class student with some financial assistance from my parents,” she said. “We are not in a position to buy me a new car. That’s really been a huge handicap this semester, and I have missed classes due to my car not functioning properly.”

Goodman said she has spent about $2,000 for car repairs this year. Meanwhile, she’s had to move to the neighboring town of Rosendale because she’s been priced out of the rental market in New Paltz. It’s only about a 15-minute drive, but “in this type of rural area, if my car isn’t working, it’s really difficult to get a ride to school.”

Transportation solutions for college students in rural areas don’t usually involve public transit “because they don’t have the infrastructure that they can leverage,” said Derek Price, founder of the research firm DVP-Praxis.

Instead, some colleges have their own vans or offer emergency grants to help students cover the cost of car repairs, new tires or rentals while their cars are in the repair shop.

Students who get transportation assistance like the GO RIO pass are more likely to remain enrolled, complete a greater number of credits and earn a credential, according to a study of Rio Hondo by DVP-Praxis for the Hope Center for College, Community, and Justice at Temple University.

Providing reduced-fare transit passes can reduce the time it takes these students to graduate, Price said. That cuts the cost of their education and “means they’re more quickly going to be able to get into the workforce to support their families.”

At a time when more strategies are needed to get students to and through colleges, he said, “transportation ought to be one of those strategies.”

This story about helping college students graduate was produced by the Hechinger Report, a nonprofit, independent news organization focused on inequality and innovation in education.