OAKLAND, Calif. (AP) — San Francisco Bay Area Rapid Transit workers are threatening a midnight strike because contract talks have reached an impasse.

The development marked a reversal from earlier reports from a union leader, who indicated both sides were moving closer.

Earlier Thursday, Roxanne Sanchez, president of Service Employees International Union Local 1021, said the transit agency and its two largest unions have "come extremely close" to agreement on economic, health care and pension issues. However, she said the parties remained apart on work rule issues.

She said the workers would walk off the job at midnight unless BART officials agree to submit the remaining issue to arbitration.

The transit agency had no immediate response to the union's announcement.

The impasse came after a marathon negotiating session that ran well into a second day Thursday as both sides worked toward a deal to end the months-long contract dispute that has left many riders under the repeated threat of a commute-crippling strike.

To the relief of thousands, trains were running on schedule Thursday morning while negotiations that began around 10 a.m. Wednesday went on for more than 24 hours.

Union and Bay Area Rapid Transit officials declined to say whether they were close to a resolution.

"We've been going for 24 straight hours now. It's been intense," said Chris Daly, political director of the Service Employees International Union, Local 1021.

BART's chief negotiator Thomas Hock said Thursday he couldn't say when talks were going to end.

"Both sides are working trying to get to that point is all I can tell you," Hock said. "It's been a very difficult time, obviously.

"This is not going to go down for lack of effort. Everybody has done everything they can possibly do to get this thing together," Hock continued. "This should be the final stretch."

Federal mediator George Cohen announced late Wednesday that trains would continue running Thursday and that the two sides were making progress.

Commuters are getting used to such announcements — they've endured seven strike deadlines, sometimes staying up past midnight waiting to hear if the trains will run in the morning.

The contentious labor talks between BART and unions have dragged on for six months — a period that has seen a chaotic dayslong strike, a cooling-off period and frazzled commuters wondering if they'll wake up to find the trains aren't running.

BART spokeswoman Alicia Trost said the agency has been flooded with calls and emails this week from commuters frustrated that they haven't been given earlier notices.

Cohen has imposed a gag order on the parties involved and neither side would say where negotiations stand.

But at least one person seems comfortable betting that a strike won't happen.

San Francisco Mayor Ed Lee left for Asia after delaying the trip for two days to ready the city for a possible strike, according to his spokeswoman, Christine Falvey.

Falvey said the mayor was being kept up to date on the talks, but the business of the city had to move on.

The key issues have been salaries and worker contributions to their health and pension plans.

Talks began in April, three months before the June 30 contract expirations, but both sides were far apart. The unions initially asked for 23.2 percent in raises over three years. BART countered with a four-year contract with 1% raises contingent on the agency meeting economic goals.

The unions contended that members made $100 million in concessions when they agreed to a deal in 2009 as BART faced a $310 million deficit. And they said they wanted their members to get their share of a $125 million operating surplus produced through increased ridership.

But the transit agency countered that it needed to control costs to help pay for new rail cars and other improvements.

On Sunday, BART General Manager Grace Crunican presented a "last, best and final offer" that includes an annual 3% raise over four years and requires workers to contribute 4% toward their pension and 9.5% toward medical benefits.

The value of BART's proposal is $57 million, BART spokeswoman Alicia Trost said, adding that the agency is looking at ways to incorporate the unions' counterproposals into that cost.

SEIU Local 1021 executive director Pete Castelli said Monday the parties were between $6 million to $10 million apart.

Workers represented by the two unions, including more than 2,300 mechanics, custodians, station agents, train operators and clerical staff, now average about $71,000 in base salary and $11,000 in overtime annually, the transit agency said. BART workers currently pay $92 a month for health care and contribute nothing toward their pensions.

Meanwhile, Gov. Jerry Brown has stepped in to at least delay a strike by workers for regional bus system Alameda-Contra Costa Transit. Such a strike would leave commuters stranded without a mass transit alternative if a BART strike is underway simultaneously.

Brown appointed a three-member panel to investigate a strike notice by union workers. The move effectively prevents a strike, which had been threatened for Thursday, for a week. A 60-day cooling-off period in the contract dispute could then be imposed.