Protests and strikes gripped several World Cup host cities Thursday as unrest spread less than a month before the soccer tournament begins.

About 1,000 people gathered for a World Cup demonstration in central Rio, playing musical instruments and holding up afternoon rush-hour traffic as hundreds of riot police stood by. By early evening, the number of protesters had more than doubled as striking teachers and university administration workers joined in.

“We are against the cup for the spending and for forgetting health and education,” said striking teacher Eduardo Douglas.

A 48-hour bus strike in the city — the second in a week — ended Wednesday night, but a strike by security guards entered its 21st day.

“The World Cup here in Brazil is the worst thing in the world for workers,” said Umberto Rocha, a director of a union for Rio security guards, speaking at a meeting. “They are investing in stadiums and forgetting the people.”

A similar demonstration in Sao Paulo, Brazil’s biggest city, ended in violence after conflict broke out between protesters and police, who used tear gas. A crowd of 2,000 also protested against the World Cup in the center of Belo Horizonte, local media reported.

In the northeastern city of Recife, Brazilian television showed dramatic scenes of crowds looting appliance stores a day after street police went on strike to demand higher wages.

Brazilian news media reported seven killings in seven hours in Recife on Wednesday night, and soldiers began appearing on the streets Thursday afternoon.

Karla de Sá, 27, who lives in the city, said her 3-year-old son’s school asked her to pick him up early because gunfights had broken out in a nearby slum.

“They never have gunfights there,” she said, speaking by phone. “The city is different. There are rumors of assaults, of robberies, looting shops, looting trucks. People put photos on Facebook. . . . Everybody wants to stay home.”

In Sao Paulo, at least eight protests took place across the city Thursday morning. Brazilian television said 2,000 protesters from a movement of homeless workers left their huge squatter camp to demonstrate outside the stadium where the opening World Cup game will be played June 12.

Riot police stood by as the protesters set piles of tires aflame, sending plumes of black smoke over the area.

Earlier, Maria Cequeira, one of the movement’s organizers, told the Globo TV network that its members wanted the land turned over to cheap housing.

The organization, which last week briefly occupied foyers of three construction companies involved in World Cup projects, promised more protests in the countdown to the tournament.

Protesters in other parts of Sao Paulo closed three highways during the morning rush hour. Striking metalworkers closed two other roads.

In Belo Horizonte, in the state of Minas Gerais, city hall workers continued a strike, and in Brasilia, the federal capital, protesters linked to the homeless-workers movement in Sao Paulo invaded a government building, said the G1 news site. The site also reported that 2,000 teachers in Rio state voted to continue their strike.