By Selena Hill (staff@latinospost.com) | First Posted: Oct 22, 2013 12:11 PM EDT

The four-day BART strike that threw San Francisco Bay Area commuters into chaos has finally come to an end.

Union leaders and transit officials announced a little after 10 p.m. PST Monday night that they reached a tentative agreement, ending the traveling nightmare for the 400,000 riders who depend on BART, the nation's fifth largest rail system.

Unions, management, local politicians and workers apologized for the strike in a joint press conference and said the deal would keep important work rules intact for employees, reports USA Today.

Des Patten, president of the BART professional chapter of Service Employees International Union, said the tentative deal includes wage increases and work rule changes that allow for innovation and input from workers. The deal also prioritizes rider and worker safety.

"This offer is more than we wanted to pay," BART General Manager Grace Crunican said, according to San Jose Mercury News. "We compromised to get to this place, as did our union members."

Crunican added that the agreement represents a "new path in terms of our partnership with workers."

"We will go back to work and continue our efforts to keep the Bay Area moving," said Antonette Bryant, president of the local Amalgamated Transit Union.

The strike, which began on Friday, was sparked over a disagreement over work rules.

The new agreement is subject to ratification by the unions' members and the BART board of directors. However, details in the agreement won't be made public until union officials have a chance to communicate with the membership.

Some BART trains began running again early Tuesday morning.