MARSEILLE, France — Two buildings collapsed into a giant pile of rubble and beams Monday in the southern French city of Marseille, leaving two people lightly hurt and authorities speaking of a race against time to find survivors possibly trapped in the ruins.

The collapse spewed debris into the street and clouds of dust into the air and left a big gap where the buildings used to be. Concerns that a third building might also collapse slowed the work of fire officers who sifted through the rubble with two sniffer dogs.

Authorities said one building had been condemned as substandard and was assumed to be unoccupied, but the other was inhabited. The government’s housing minister, Julien Denormandie, said at the scene he couldn’t rule out that people were trapped in the collapse.

“It’s a race against the clock,” Denormandie said. “The urgent task is to determine whether there are people we can save.”

Marseille fire services said two people who were in the street when the buildings collapsed were treated for light injuries. Thick dust covered cars around the site that is close to Marseille’s famous Old Port.

Amateur video broadcast on BFM-TV showed clouds of dust and bystanders covering their mouths with their sleeves.

Images of the buildings before they collapsed, visible on Google Street View , showed that one had five floors and the other six.

One of the buildings was clearly in poor repair, with boarded-up windows and large visible cracks on the facade before it collapsed.

Sabine Bernasconi, the local mayor for that part of Marseille, said one of the buildings was subject to an evacuation order, but could not say for sure that squatters were not using it.

The regional prefecture urged people to avoid the area and make way for emergency services.