ANKARA, Turkey—President Recep Tayyip Erdogancelebrated his twin victory in presidential and parliamentary elections as his main competitor conceded defeat, heralding a more assertive Turkey rooted in nationalism as much as in conservative Islam.

Delivering a traditional balcony speech from the headquarters of his Justice & Development Party, or AKP, on Monday, Mr. Erdogan thanked his alliance partner, the Nationalist Movement Party, or MHP, whose showing helped the president maintain a majority in Parliament.