Updated

San Francisco Bay Area Rapid Transit workers walked off the job Friday for the second time in four months after a marathon negotiating session that led the transit system and its two largest unions closer to a contract deal.

The walkout officially began at midnight Thursday and it comes after six months of on-again, off-again talks fell apart. Officials from both unions representing workers for Bay Area Rapid Transit as well as the agency itself confirmed the strike.

The unions said they agreed with BART on economic, health care and pension issues, but that the parties still differed on work rule issues. They said they asked BART to take the remaining issues to arbitration but management refused.

BART maintained it needed to alter some of those rules to run the system efficiently and control costs

Antoinette Bryant, with the Amalgamated Transit Union, told The Associated Press early Friday morning that her workers were on strike as of midnight, while Cecille Isidro of the Service Employees International Union confirmed to the San Francisco Chronicle that the unions were striking.

Agency spokesman Rick Rice also confirmed the strike by the unions in an email sent early Friday, but he said that the trains would finish their runs early Friday so riders wouldn't be stranded.

"They don't need to strike," he said. "They could instead take BART's offer to a vote of their members or continue to discuss options that could lead to a resolution."

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.

"I'm sorry. I'm regretful," Sanchez said at a news conference outside the offices in Oakland where negotiations were taking place, according to KTVU.com.

"The employer has been unwilling to reach an agreement or to settle these disputes without a strike," Sanchez said Thursday afternoon.

About 20 minutes later, federal mediator George Cohen spoke on the negotiations, KTVU.com reported. He said that although several points of agreement had been reached, the participation of federal meditators was ending Thursday afternoon. The team that had been with Cohen will consequently return to Washington.

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 percent 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 percent raise over four years and requires workers to contribute 4 percent toward their pension and 9.5 percent 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.

The Associated Press contributed to this report.