SAO PAULO — Tens of thousands of workers across Brazil walked off their jobs on Thursday in a mostly peaceful nationwide strike demanding better working conditions and improved public services in Latin America's biggest nation.

Metalworkers, transportation and construction workers as well as teachers and civil servants adhered to the "Day of Struggle" organized by Brazil's biggest trade unions.

Strikers either partially or completely blocked 80 interstate and intercity highways in 18 states.

About 2,500 strikers marched in Rio de Janeiro, where some clashed with police, who unleashed tear gas and rubber bullets in response to a few protesters hurling rocks at them. By nightfall, protesters were still gathered in Rio's center area, and scattered skirmishes with police were reported. There was no word on injuries.

In the city of Santos, dock workers prevented trucks from entering Latin America's biggest port. Striking stevedores also blocked access to ports in another six states.

Some banks located in areas where protesters were expected to stage large rallies closed down but allowed access to ATMs

In Sao Paulo, about 5,000 people rallied along Avenida Paulista one of the city's main thoroughfares, with banners demanding a shorter work week, better working conditions and affordable housing.

Teachers at public and private schools also went on strike and closed schools in several cities, while some hospitals were operating with skeleton crews. However, subway, bus and train workers in Sao Paulo, Rio de Janeiro and other state capitals did not join the strike, and transportation services were functioning normally.

The absence of subway, bus and train workers "weakened the day of struggle," Joao Carlos Goncalves, secretary general of trade union federation Union Force, told the Agencia Estado news agency.

"But nevertheless we have mobilized the workers and called attention to our demands, which was what we wanted to achieve," he added.

The strikers are demanding better public transit, health and education services as well as agriculture reform and a reduced work week.

The strike follows mass nationwide protests that swept Brazil last month when demonstrators angered with corruption, poor public services and a heavy tax burden took to the streets. The protests also denounced the billions of dollars spent to host the World Cup and the 2016 Olympics in Rio, money they say should be going toward better hospitals, schools and transportation.

However, last month's protests were more energetic and there were more violent clashes with police. The majority of those participating last month also rejected the presence of any unions or political parties in the demonstrations, both of whom many consider part of a corrupt, established governing system. Fights broke out during protests in Sao Paulo when unions and parties tried to join in some demonstrations.

President Dilma Rousseff has responded to the unrest by floating several proposals including spending $23 billion on urban transportation, using oil royalties to fund education and importing thousands of foreign doctors to work in impoverished, underserved areas.

She also ordered her Cabinet to focus on solutions for five priority areas: fiscal responsibility and controlling inflation, political reform, health care, public transport and education.