The death toll from Thursday's building collapse in Istanbul's Maltepe district has risen to five, and the search for survivors is over.

Rescuers recovered three more bodies from the rubble, bianet reported. The Istanbul governor's office said the search ended after the last body was found at 6:15 a.m. Friday local time, according to Euronews. Of the 14 people pulled from the debris, four died at the scene and one died in the hospital, Euronews reported.

The lower three floors of the seven-story building on Doğu Street gave way at about 5:40 a.m. Thursday, and the upper floors tilted sideways. Crews later stopped working inside because the rest of the building could fall, and they began taking it down in a controlled way from the top, Daily Sabah reported.

The building went up in 1987. It had a shop on the ground floor and 12 apartments above it. Official records show 33 people lived there, the governor said.

Prosecutors have opened an investigation, and the building's architect and construction site manager have been detained, Daily Sabah, bianet and Cumhuriyet reported. Officials are also trying to identify the public employees who signed the building's permits. Turkey's interior minister, Mustafa Çiftçi, said two state inspectors have been assigned to look into whether public officials were at fault.

How much of the building was illegal is still unclear. Maltepe Mayor Esin Köymen said the top two floors had been added without permits, bianet reported. But inspectors from the Istanbul city government found the building was first built with a basement, a ground floor and two floors, and that four floors were added later without permits, Euronews reported. Orders to tear down those floors were issued but never carried out, it said.

Crews have taken concrete and steel samples from the building to find out why it fell, Cumhuriyet reported. Fifty-five people from three nearby buildings were moved out as a safety step, and 44 of them were placed in hotels.

What we know: Five people died, the search has ended, and two people tied to the building are in custody.
What we don't: What caused the collapse, and whether more people will be charged.