OAKLAND — Despite a rise in complaints and a decline in the number of riders taking the trains, BART’s governing board on Thursday narrowly approved a nearly 12 percent fare hike, spread out over four years.

The decision, by a 6 to 3 vote, came near the end of a more than seven-hour board meeting and reversed an earlier vote to reject the increase.

In the end, it came down to newly elected BART board Director Mark Foley, who initially voted to reject the increase but later changed his position. He offered an amendment removing the final year of increases, which was scheduled to take place in 2028, shortening the period of biannual inflation-based increases from six years to four.

“In my eyes, it’s a compromise,” Foley said, “to not jeopardize the long-term financial health but to also offer an opportunity to look down the road at ways to change the program.”

Without the increases, BART’s bond ratings would be negatively affected and all its financial forecasts would have to redrawn, said BART General Manager Grace Crunican.

“This changes everything for us. This is a huge sum of money,” she said after the initial five-to-four vote rejecting the hikes, and she urged the board to reconsider. The increase needed six votes to pass.

The controversy came as the board approved a nearly $2.4 billion budget that sought to cut expenses as the number of passengers riding the system declines. The number of weekday riders taking trains is down nearly 3 percent since the same time last year, but Saturday and Sunday have suffered the most, with declines in riders of 12.5 percent and 6.4 percent, respectively. BART relies heavily on ticket sales to fund operations of the system, which pay for roughly 75 percent of the operating costs.

As riders opt for other ways to get around, the number of complaints has grown, rising 67 percent since the same time last year, with riders griping about “announcements, apps, (the) bike program, biohazards, parking, police, quality of life, service and train cleanliness,” BART said in a report.

“No service-providing business would make this kind of economic decision to raise its prices while service is declining,” said BART board Director Debora Allen. “Riders deserve more, more than they’ve seen in the last several years of fare increases.”

Despite the declines in revenue, the budget includes nearly $16 million to hire more police officers, improve the cleanliness of stations and trains and combat fare evasion by making it more difficult for people to jump or bypass the fare gates. It also includes a 20 percent discount for low-income riders as part of a regional, 12 to 18-month pilot program, in partnership with MUNI, Caltrain and Golden Gate Transit, that is expected to roll out later this year. The board rejected a proposal to raise the surcharge on paper tickets from 50 cents to $1.

BART first implemented inflation-based fare increases in 2003, re-affirming the policy 10 years later in 2013. The increases are calculated by taking the average of the national and Bay Area inflation rates over two years and then subtracting one-half percent.

The final increase in the series of fare hikes approved in 2013 will be implemented in 2020, when fares increase by 5.4 percent. After that, fares would increase by an estimated average of 3.9 percent in 2022, 2024 and 2026, though the actual rate would be determined by what happens with inflation during that time.

The policy was intended to stabilize fares by approving regular, moderate increases instead of going for years, or sometimes even a decade or more, with flat fares and then hiking prices drastically, said Kate Jordan Steiner, BART’s budget director. After a decade of flat fares, BART in 1995 was forced to raise fares by 45 percent over two years, a move that was “gut-wrenching” for riders, said BART board Director John McPartland.

“It’s never easy and it’s never popular to talk about fare increases,” Steiner said. “This a long-term financial planning tool to have some level of certainty in our fares.”

The fare increases have historically been tied to specific uses. Between 2006 and 2012, it helped BART stave off cuts during the Great Recession. In 2014, the increase in fares was dedicated to three key capital projects that would improve reliability and add capacity throughout the system by expanding its maintenance complex in Hayward, upgrading its train control system and purchasing new rail cars. The newly-approved fare increases continue to invest in those projects.