A pedestrian walks by closed pay gate at the Bay Area Rapid Transit (BART) Daly City station on July 3, 2013 in Daly City, California.

BART has more money than it planned for during the depths of the global economic crisis thanks to an unexpected boost in revenue, but whether the transit agency spends that cash on worker salaries or long-term capital improvements is the latest wedge in its ongoing labor dispute.

In 2009, BART prepared for a budget deficit of $249 million by 2013. After raising fares and cutting labor costs, and thanks in large part to a record increase in ridership during the economic recovery, BART is instead in the black, according to a May 28 budget presentation.

From 2009 to 2013, fare revenue and regional sales taxes were $166 million higher than projected. The agency also came in under budget on expenses by $155 million, including $111 million under budget on worker wages and benefits.

BART workers say these numbers mean future budget forecasts are too conservative, and that the agency can afford the pay increases that are central to the ongoing labor negotiations.

BART and its two largest unions — Service Employees International Union Local 1021 and Amalgamated Transit Union Local 1555 — have been without a contract since June 30 and are squabbling over the exact meaning of the agency's finances.

The transit agency's budget picture can change rapidly.

In March, BART officials budgeted $380 million in passenger revenue for the 2013 fiscal year, according to its annual budget documents. By May 28, BART had realized $396 million in fares. Labor costs also came in $19 million under budget.

Things are better than feared four years ago, but it would have been "irresponsible" for BART to plan for a quick recovery, according to spokeswoman Alicia Trost.

"In 2009 no one knew the surge of ridership in 2012 and 2013 would happen," she said Tuesday, noting that the daily average ridership dipped from 356,712 passengers in 2009 to 334,984 in 2010.

However, that average surged to 392,800 this year and is expected to continue rising over the next five years.

BART has a $1.6 billion annual budget. The agency turns a profit on its operational budget — taking in more in sales taxes and passenger revenue than it spends on worker expenses — but those savings are applied to paying off debt, buying new rail cars and other capital expenses to ensure the 40-year-old system can keep running smoothly.

BART plans to direct $384 million in operating surplus over the next five years toward capital improvements, such as the $1.3 billion it needs to buy new rail cars and build a new train control center and maintenance yard.

A strike halted trains for 4½ days in early July. A 30-day cooling-off period expires Sunday night, at which point another strike is possible.

Still haggling

BART and its two largest unions are still far apart on terms for a new labor contract.

BART's July 2 offer:

Salary increases: 2% a year for 4 years

Pension contributions: 5% of paycheck after 4 years on job

Health care costs: 10 percent of premium

Union offer:

Salary increases: 7% a year for 3 years

Pension contributions: 3% of paycheck after 3 years on job

Health care costs: Flat $92 per month

Note: BART says its proposal would cost $33 million over three years and the unions' proposal would cost $134 million; unions sacrificed $100 million in wage increases in 2009.