Turkish President Tayyip Erdogan said on Wednesday Turkey was ready to give all support to Baghdad as it seeks to reopen a crude oil pipeline from the Kirkuk oilfields to Turkey, through which Iraq stopped sending oil in 2014.

In a statement to media after meeting Iraqi Prime Minister Haider al-Abadi, Erdogan said they discussed what political, military and economic steps they could take after what he called the “illegitimate” Iraqi Kurdish referendum last month.