Oakland — The San Francisco Bay Area's main commuter train system and its unions reached a tentative agreement on a new contract Monday night, ending a crippling four-day strike.Union officials announced the deal, which still requires approval from union members, then from Bay Area Rapid Transit's board of directors.BART spokeswoman Alicia Trost said limited service would begin Tuesday at 04:00 on all lines. BART officials hoped trains would be running at full strength in time for the afternoon commute.BART is the nation's fifth-largest rail system, with an average weekday ridership of 400 000.Workers walked off the job on Friday after talks broke down. Commuters endured jammed roadways and long lines for buses and ferries, as they looked for alternate ways around the region.The contentious talks between BART and its two largest unions dragged on for six months— a period that saw two chaotic days-long strikes, contentious negotiations and frazzled commuters wondering if they would wake up to find the trains running or not."The public expects us to resolve our differences and to keep the Bay Area moving," BART general manager Grace Crunican said Monday night.Crunican said there would be no immediate announcements on the details while union leaders explained the agreement to their members, but she said it was a compromise and added: "This deal is more than we wanted to pay."Negotiations resumed and a settlement was reached just two days after two track workers were killed in a BART train accident in Walnut Creek. Federal investigators said Monday that the train was run by a BART employee who was being trained to operate trains. Union officials had warned that training managers to operate trains during the walkout could be dangerous."This is a reminder, this weekend, that this is about people," said Lt Gov. Gavin Newsom, who joined BART and union officials to announce the settlement.Of the strike, he said, "This has got to be the last time this happens."Antonette Bryant, president of the Amalgamated Transit Union Local 1555, expressed her condolences Monday night to the families of the workers who were killed."We did not want to strike," she said, "and we are glad to have a tentative agreement that we feel will work for all parties."The key issues in the negotiations were 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% in raises over three years. BART countered, offering a four-year contract with 1% raises contingent on the agency meeting economic goals.The transit agency said it needed to control costs to help pay for new rail cars and other improvements.The main sticking point was work rules, which can be anything from how schedules are made and how grievances are handled to how paychecks are distributed and whether reports are written electronically or in longhand. For workers, stricter rules create stability in their assignments and how they do their jobs. For managers, they limit how flexibly and efficiently they can run the system.Some of the biggest work-rule changes BART sought relate to work shifts and worker protections.___Thanawala reported from San Francisco. Associated Press writers Haven Daley and Terence Chea in Walnut Creek contributed to this report.