Hundreds of thousands of San Francisco Bay area commuters got at least a temporary reprieve from a massive transit strike when Gov. Jerry Brown intervened in a labor contract dispute.

Sunday night's eleventh hour order averted the walkout and left the morning commute to proceed normally, without the widespread travel congestion that a strike involving Bay Area Rapid Transit, the nation's fifth largest rail line, would have created.

In the order, Brown named a board of investigators for a seven-day inquiry into the contract dispute that had labor unions poised to walk off the job at midnight Sunday.

The order Brown issued came under a law that allows the state's intervention if a strike will significantly disrupt public transportation services and endanger public health.

"For the sake of the people of the Bay Area, I urge - in the strongest terms possible - the parties to meet quickly and as long as necessary to get this dispute resolved," Brown said in the order.

The board will report its findings to the governor, who can then petition a court to call a 60-day cooling-off period, said Evan Westrup, a spokesman for Brown. The report will explain BART and the unions' positions, but will not find fault or issue a recommendation.

In a statement, BART spokesman Rick Rice said the transit authority's board president Tom Radulovich sent a letter to the governor requesting his intervention and a cooling off period of 60 days. The governor issued an order with considerably less time of a week.

"The formal impartial fact-finding that accompanies the cooling-off period will help clarify the points of difference between the proposals," the statement said.

Union leaders issued a critical statement after the order, accusing BART management negotiators of stalling until only hours remained before the strike would have begun to provide counter proposals on core pay and benefits.

"Our hope is that the Governor's Board of Investigation will reveal how little time BART management has spent at the bargaining table in the past 30 days, compared with how much time they've spent posturing to the media," said SEIU 1021 President Roxanne Sanchez.

BART spokeswoman Alicia Trost said late Sunday that it is "extremely frustrating" that the unions were misrepresenting the improved proposals they've been getting, including wage increases, and the transit authority was hard at work all weekend despite allegations of absence.

"We made several proposals this weekend and they all went in one direction and that was up, up, up," said Trost.

Bay Area Rapid Transit managers and union leaders had returned to the bargaining table Sunday in hopes of heading off a strike that would have affected 400,000 commuters and created traffic nightmares for the San Francisco area for the second time in a month.

Representatives from BART management and the agency's two largest employee unions negotiated for about 14 hours Saturday and resumed bargaining Sunday morning as a midnight deadline loomed. Brown's order came at around 10:30 p.m. Sunday.

Union train operators and station agents average about $71,000 in base salary and $11,000 in overtime annually. They pay nothing toward their pensions and a $92-a-month flat fee for health insurance, according to BART.

Despite allegations of stalling late Sunday, earlier in the weekend union leaders cautiously expressed hope for agreement and said progress was being made.

"The parties made some important but incremental moves yesterday, and I hope to get to a deal," Josie Mooney, chief negotiator for the Service Employees International Union 1021, said Sunday before heading into negotiations. "If the parties work very hard, then it's certainly possible in the amount of time we have left."

"There was definitely movement from both sides," BART chief negotiator Thomas Hock said as he left negotiations late Saturday night. "Hopefully, if we keep moving, we will get to a proposal that both sides can agree to."

BART's two largest unions issued a 72-hour notice Thursday that employees would walk off the job if they didn't reach agreement on a new contract by midnight Sunday.

"BART really is the backbone of the transit network. No other transit agency has the ability to absorb BART's capacity if there's a disruption," said John Goodwin, spokesman for the Metropolitan Transportation Commission.

In the event of a strike, transit agencies had planned to add bus and ferry service, keep carpool lanes open all day and even give away coffee gift cards to encourage drivers to pick up riders. They were also encouraging workers to avoid peak traffic hours or telecommute if possible.

When BART workers shut down train service for four days in early July, roadways were packed and commuters waited in long lines for buses and ferries. The unions agreed to call off that strike and extend their contracts until Sunday while negotiations continued.

Bay Area and state officials have been pressuring BART managers and union leaders to reach an agreement this weekend, saying a strike would create financial hardship for working families and hurt the region's economy.