ISTANBUL -- Police increased security around Istanbul on Wednesday and detained some 20 people with suspected links to the deadly New Year's Eve night club attack as the hunt for the gunman stretched into a fourth day.
Turkish Foreign Minister Mevlut Cavusoglu said the gunman -- who killed 39 people during New Year's celebrations at the Reina club before reportedly escaping in a taxi -- had been identified, but did not name him.
Police set up checkpoints across Istanbul as security levels remained high. They stopped cars and taxis, with passengers and drivers holding up their identifications while officers inspected the vehicles.
The city has been on edge since the attack on the upscale club popular with local celebrities, and on Wednesday residents beat up a man said to resemble the wanted gunman before handing him over to police, the Dogan news agency reported.
Some 20 people, including 11 women, were taken into custody in police raids in the Aegean port city of Izmir, the state-run Anadolu agency said.
The suspects, from the largely Muslim Russian republic of Dagestan, as well as members of China's Muslim Uighur minority and from Syria, were believed to have lived with the gunman in an alleged IS cell house in the central Turkish city of Konya, the agency reported. Some 20 children who were with the detainees were also taken to a police station.
At least 16 people were previously detained in connection with the massacre.
IS has claimed responsibility for the attack, saying it was in reprisal for Turkish military operations against IS in northern Syria. Of those killed, 27 were foreigners -- many from the Middle East.
In his first public address to the nation since the killings, President Recep Tayyip Erdogan said that the attack aimed to set Turks against each other and deepen fault lines, but warned the country would not fall "for this game."
His comments followed a campaign before the attack by some ruling party supporters and pro-Islamic groups who warned against New Year's celebrations they depicted as Western or Christian traditions, as well as some social media postings that seemed to support the attack on the New Year's revelers.
The campaign and social media postings were condemned by more secular-minded Turks who said their lifestyles were being threatened.
The government has said authorities were taking measures against social media accounts that allegedly "support terrorism and foster divisiveness in society."
"I repeat once again: no one's lifestyle is under systematic threat in Turkey," Erdogan said in his address Wednesday. "We would never allow such a thing. We didn't allow it in 14 years of governance. If anyone alleges differently they need to put forward concrete examples."
Erdogan also dismissed accusations that Turkey has, in the past, given support to IS.
"To present the country -- which is leading the greatest struggle against Daesh -- as one that is supporting terrorism is what the terror organization wants," he said, using the Arabic alternate acronym for IS. "To say Turkey has surrendered to terrorism is to take sides with the terrorists and terror organizations."
Meanwhile, details about the suspected gunman's movements trickled in on Wednesday.
The Hurriyet newspaper said he had previously entered Turkey twice, in 2014 and in 2015. He is believed to have slipped illegally into Syria, where he received training in the use of guns and bombs and fought.
The pro-government Sabah newspaper identified the suspect as a Kyrgyz national who was born in 1988. It said he had been in contact with a chief IS operative in Istanbul whose aide -- a Tajik national -- was among those in custody.
Among those detained Wednesday were seven Uighurs suspected of giving money to the gunman after the attack for him to pay his taxi fare, according to the Haber Turk newspaper.
Semsettin Dursun, the owner of an Istanbul restaurant where the Uighurs worked, confirmed that some staff were detained but dismissed claims they were involved.
"They are innocent," Dursun told reporters. "That is the taxi driver's claim. It is a single taxi driver's claim. We don't accept it. There is no other evidence."
Turkey's European Union affairs minister, Omer Celik, said the attack was carried out in an "extremely professional way" and that the assailant appeared to have received training in the Middle East.
He said the attacker was using methods "that avoid all modern intelligence techniques," including acting alone, not contacting anyone and "not using technology."
Fraser reported from Ankara. Associated Press reporter Mehmet Guzel in Istanbul contributed to this report