DIYARBAKIR, Turkey — A car bomb killed seven police officers and wounded around two dozen people in the southeastern Turkish city of Diyarbakir on Thursday, security sources and officials said, a day before the prime minister was to visit the biggest city in the largely Kurdish southeast.

A parked car laden with explosives was detonated by remote control as a minibus carrying the police officers turned a corner on a busy street, the officials said, adding that civilians were also among the wounded.

President Recep Tayyip Erdogan, who is on a visit to Washington for meetings on nuclear security, denounced the attack, saying it showed the “ugly face” of militants “as they are cornered.”

In a speech to the Brookings Institution, Mr. Erdogan said: “This shows terrorism’s ugly face again. The determination of our security forces will, God willing, put an end” to it.