BART officials were set Thursday to fill a looming multimillion-dollar budget gap in ways that would hurt many of its passengers.

They would start trains an hour later in the morning, eliminate after-hours bus service and slash discounts for seniors, kids and riders with disabilities.

But all that changed abruptly with word Wednesday night that a state transportation bill, which became law last week, will bring the rail system millions of dollars more in funding than BART officials had anticipated. Sacramento would deliver an extra $16 million this year — enough to allow BART to pare its proposed budget cuts nearly in half.

Although trains are jammed with riders during weekday commutes, BART blames the projected $31 million deficit on declining ridership — mostly on weekends — and a drop in sales tax revenue.

“What a difference a week makes,” said BART Director Robert Raburn, who was not looking forward to making the proposed cuts. “It looks like we may be able to eliminate service cuts and reduce fare increases that were being discussed. ... This is big news.”

That sent staff back to their spreadsheets. Seniors, people with disabilities, early risers and late workers or partyers would be spared from the budget cuts, but youths would have to pay higher fares, as would riders who continue to rely on BART’s familiar paper tickets with the magnetic stripe rather than switch to Clipper cards.

The transportation law, which will raise gas taxes and vehicle registration fees, has drawn attention for raising money to fill potholes, rebuild bridges and repair roads. But it also generates money for public transportation agencies, including BART.

BART officials knew some money was coming but didn’t know how much. Details of the windfall came so late that the agency’s number crunchers were still busy updating their list of proposed cuts as the Board of Directors meeting started Thursday morning.

“This (budget proposal) was made before we had an influx of state transit assistance,” said Carter Mau, BART’s planning and budget manager, speaking softly and matter-of-factly.

The package of service reductions, expense cuts and fare increases was put together by BART’s budget staff as the agency grappled with an estimated $31 million shortfall for the fiscal year that begins July 1.

The cuts affecting riders most directly included starting service at 5 a.m. instead of 4 a.m., eliminating some timed transfers between trains and reducing discounts for seniors, people with disabilities and youths from 62.5 percent to 50 percent. The proposed budget also excluded funding for a late-night bus network that provides transit service after BART shuts down.

While the youth discount is still proposed to drop to 50 percent, the budget anticipates raising the maximum age, from 12 to 18, for kids to get discounts. The amount of discount and maximum age are similar to those of other Bay Area transit agencies.

In addition to the youth fares, BART directors are eyeing a 50-cent surcharge every time a rider purchases a paper ticket. The fee is designed to encourage riders to switch to the Clipper card to reduce cash-counting and ticket-processing costs. It is expected to raise $5.6 million.

The budget also proposes to eliminate 15 already vacant positions, and move 24.5 positions to capital projects, which would save $5.3 million; to defer payments on its new railcars for a savings of $6 million; and to reduce the amount of operating expenses it transfers to capital expenses by $6.3 million. That potential reduction is controversial because some critics of Measure RR, the $3.5 billion bond voters approved in November, warned before the election that BART would curtail its contributions into its capital budget if the measure passed.

BART’s decision not to cut early-morning service spares thousands of passengers who rely on it to get to their jobs or avoid crowded trains later. A BART study last year found that 2,600 passengers entered the system between 3:45 a.m. and 4:45 a.m. Most of those riders boarded at Pittsburg/Bay Point, Dublin/Pleasanton or El Cerrito Del Norte stations and exited at Embarcadero, Montgomery or Powell stations. About two-thirds of those early riders were minorities.

BART’s budget planners are also suggesting new programs that will increase costs. Extending the youth discount will cost an estimated $1.5 million, while an efficiency study of BART’s operating division is projected at $1 million. BART is considering spending $800,000 on a program to combat fare evasion.

While BART’s declining ridership and sales tax revenue may contribute to the deficit, so do the opening of new extensions, said Nick Josefowitz, a BART director from San Francisco. Josefowitz said the opening of extensions to Warm Springs/South Fremont last month and, in spring 2018, of a diesel-rail line in eastern Contra Costa County, are also driving the deficit. Revenue from new passengers won’t cover the cost of staffing the new stations and trains, he said. He was unable to immediately provide dollar figures.

Director Tom Blalock of Fremont disputed Josefowitz’s argument. Transit systems, he said, never cover their costs, and always require subsidies.

The debate over the budget will continue. BART directors are scheduled to hold 12 more meetings before adopting a final spending plan June 22.

Michael Cabanatuan is a San Francisco Chronicle staff writer. Email: mcabanatuan@sfchronicle.com Twitter:@ctuan