Davutoğlu became Recep Tayyip Erdoğan's chief foreign policy advisor after the latter became prime minister, developing the Justice and Development Party's new foreign policy outlook that would bring Turkey to play a larger role in the Middle East. His position as chief advisor coincided with the 2003 US-led invasion of Iraq, with Davutoğlu co-ordinating Turkish responses to ongoing military efforts in Turkey's neighbouring country. In 2007, he stated that Turkey was against the United States troops entering northern Iraq, with his opposition originating from the Kurdish separatist movements in that area.