Erdogan acknowledged the electoral setback in a speech, saying his party had suffered “a loss of altitude” across Turkey.