When John Leyba boarded Caltrain on Tuesday morning at the Diridon Station in downtown San Jose, he found it "insanely crowded" -- standing room only most of the way to San Francisco, where he works for PG&E as a business analyst.

And when he transferred onto a Muni bus at 4th and King streets, he barely made it inside the door.

In a remarkable turnaround for transit agencies that have repeatedly slashed services, raised fares and lost state and federal funding, transit ridership is steadily rising throughout the Bay Area. Caltrain ridership was up almost 12 percent and BART almost 8 percent in weekday use in June compared with the same month a year ago. The Valley Transportation Authority saw an increase of more than 7 percent and the ACE commuter train of more than 14 percent, while SamTrans ridership was up 0.4 percent.

Of 11 agencies surveyed, only AC Transit and Santa Cruz Metro reported a decline, of 1.5 and 1.3 percent respectively, which they blame on recent reductions in service and expect will increase soon.

Gas prices that averaged $4.32 a gallon in the region in May are "the largest factor, undoubtedly," said Stuart Cohen, executive director of TransForm, an Oakland-based transportation advocacy group. "There is clearly a change in behavior when you see $4 at the pump and $50 fill-ups for a midsize car."

But Cohen and others say it's not just the price of gas. Higher bridge tolls and parking fees have hit drivers
in the pocketbook and led some to take the bus or train to save money. Some are cutting back on driving to reduce the cost of maintaining older cars as they worry about keeping their jobs.

Cohen's group estimates a motorist in the Bay Area can save almost $600 a month by taking public transit to work instead of driving. The American Public Transportation Administration says a person in San Francisco could save nearly $1,100 a month.

The region's unemployment remains stubbornly high, and layoffs almost always mean fewer transit riders, but not this time.

Taking transit now comes with perks that makes the ride more enjoyable. Some riders get free passes from employers. And the Clipper Card is now in widespread use and accepted as a universal ticket pass by almost all Bay Area agencies. Caltrain's bullet trains shave nearly 30 minutes off a trip from San Jose to San Francisco. Some VTA light rail trains skip stations along Highway 87 to cut several minutes off a ride from South San Jose to downtown.

"This gives customers a faster travel option as well as the ability to work or relax while on the train," VTA spokeswoman Brandi Childress said, pointing to a recent survey that found that 16 percent of light-rail riders on the express trains are new and motivated to try transit by the new features.

"Out of those new customers, 69 percent of them are now riding the express (trains) four to five days a week," she said.

While gas prices have fallen to an average of $3.76 a gallon in California, the U.S. Energy Administration predicts that the price of crude oil could rise to $107 a barrel next year, or nearly $30 higher than today, which will probably mean a return to $4-a-gallon gas.

"Everyone is watching their pennies," said Leyba, who says his $232 monthly Caltrain pass is a bargain compared with the $14 to $20 a day parking fee he would pay in San Francisco if he drove. Never mind the cost of gas, wear and tear and insurance if he had to get a second vehicle.

Lisa Bonetti rides a VTA express bus from Sunnyvale to work in Palo Alto to also reduce her commuting costs.

"I definitely think the recent market decline will impact ridership," she said. "We have two older cars which are starting to fail, but since we have one reliable car and public transportation as an option, we plan to defer making that large purchase for a little while."

And when on the bus, she does more than nap or read a book. She pulls out her smartphone.

"Riders can be more productive than ever during the commute hours," she said. "It is sometimes the only time of day when I can get a chance to read emails and respond uninterrupted."