Subway workers went on strike in Brazil's biggest city on Wednesday, but ended it five hours later after halting a system used daily by more than 4 million people and snarling the city's already difficult traffic.
The subway workers union said in a statement they accepted a 6.09 percent pay hike plus increases in the value of meal vouchers and household food supplement allowances.
The Sao Paulo Metro Company confirmed the end of the strike and said workers had already begun to return to their jobs. It did not immediately provide further details on the agreement.
Earlier, Ciro Morais, a spokesman for the subway workers union, said 8,000 of the city's nearly 9,000 subway workers walked off their jobs to demand a 20 percent pay hike.
Morais said a few trains operated during the day because the company deployed non-striking workers and managers to run some stations.
During the strike, the city's normally traffic-clogged streets and avenues became even more congested as more people used their cars or rode the city's overcrowded bus transportation system.
Adilanta Fereira, 23, said she lives far away from the restaurant where she works on Sao Paulo's Avenida Paulista in the central part of the city and the strike turned her morning commute into a nightmare.
"Normally I have to take two different buses to get to work and it takes about 90 minutes each way," she said as she handed out fliers on the street for the restaurant where she works. "Today it took three hours, I was late for work, and I have no idea how long it'll take me to get home."
Police used tear gas and rubber bullets to disperse angry subway users who for more than an hour blocked a station to protest the strike. Local news media said two people were briefly detained and one woman was slightly injured when she fell to the ground.
On Tuesday, a labor court ruled that all workers should be at their jobs during rush hours and that at least 85 percent of them had to work during the rest of the day. The court said that failure to obey would result in a daily $50,000 fine against the union.
Public transportation in six other cities has been practically paralyzed for the past week in separate strikes by subway workers, bus drivers and commuter train operators.