Turkey’s president was among hundreds of mourners who attended the funeral Saturday for nine members of a family killed in the apartment building collapse in Istanbul as the overall death toll increased to 17.

Recep Tayyip Erdogan and other officials joined the funeral prayers for the Alemdar family following the president’s first visit to the site of Wednesday’s tragedy. Five other members of the Alemdar family, including two children, remain hospitalized.

The cause of Wednesday’s collapse is under investigation but officials have said the top three floors of the eight-story building in the Kartal district were built illegally.

“In this area, we have faced a very serious problem with illegal businesses like this done to make more money,” Erdogan told reporters outside a hospital.

Thirteen people remain hospitalized with seven of them in serious condition.

Erdogan said there were “many lessons to learn,” and the government would take “steps in a determined way” after investigators complete their work. Earlier, Health Minister Fahrettin Koca increased the death toll to 17.

Friends and relatives waited near the wreckage for news of their missing loved ones as emergency teams, aided by sniffer dogs, worked around the clock to reach possible survivors.

Officials haven’t disclosed how many people are still unaccounted for. The building had 14 apartments with 43 registered residents.