MARSEILLE, France — Two buildings collapsed into a pile of rubble and beams on Monday in Marseille, and the authorities said they were in “a race against the clock” to find anyone who might be trapped in the ruins.

The buildings — one condemned, the other inhabited — gave way sometime after 9 a.m. In the spot where they had stood, a large gap appeared as the dust and debris settled.

The French president, Emmanuel Macron, said Monday evening that it was unknown if anyone had been killed or trapped. But two people who were on the street when the buildings collapsed were treated for slight injuries, the Marseille fire services said.

After the collapse, fire officials deliberately brought down most of a third building out of concern that the unstable structure might topple onto search crews and dogs sent in to comb the rubble of the other buildings.