After following a route around the historic city center, the march returned to the Municipal Theater, from where it had begun -- and shortly afterwards chaotic scenes broke out between protesters and security forces.
Police said they responded when a flare was let off in their direction.
The protest's organizers, the Free Fare Movement, or Movimento Passe Livre, MPL, said via Twitter that the security forces fired first and that those policing the event had set out to "ruin the protest with violence."
An Anadolu Agency correspondent at the scene said tactical forces used volleys of tear gas, stun grenades and rubber bullets to disperse the crowds. The tear gas used by police caused both protesters, journalists and other bystanders in the vicinity to experience severe breathing troubles, he added.
Some protesters were seen throwing rocks, glass and wood at police. The AA correspondent witnessed a minor who sustained a head injury while being detained by police. Also among the injured was a local journalist from the Estado de S.Paulo newspaper.
Military police said detainees were found to have flares in their possession, according to local media, which also reported at least four banks had been vandalized as protesters were dispersed by riot troops.
Banks have been a frequent target for vandals during previous marches.
This was the fourth protest in 2015 called by the MPL, which is demanding that a recent price hike in bus, metro and local train services from $1.16 (3.00 reais) to $1.35 (3.50 reais) be reversed. Its ultimate goal is to force the local government to provide free public transport to all.
The MPL said on Twitter that up to 10,000 people joined the march but two military police sources estimated that between 1,200 and 3,000 protesters took part in the rally. Some 1,100 troops were at the event.
The number of protesters taking part in the events has fallen since the first one on Jan. 9; all four protests have been marred by violence and vandalism.
The first event that was attended by 5,000 protesters according to police figures and 30,000 according to the MPL, saw some 53 people detained.
A fifth protest has been called in São Paulo for Jan. 27.