BAGHDAD, Iraq, The Iraqi and Turkish governments agreed on an Iraqi demand that Turkish troops withdraw from a military base, at the town of Bashiqa, near the stronghold of the Daesh in Mosul.

"We have discussed the Iraqi demand of withdrawing Turkish forces from Bashiqa, and the Turkish side confirmed that they will solve the issue of their troops' presence in Bashiqa soon," Iraqi Prime Minister, Haider al-Abadi, told reporters at a joint news conference with his Turkish counterpart, Binali Yildirim.

"We have agreed on non-interference in internal affairs of each other's country and vowed to respect the sovereignty of both countries," Abadi said, after meeting with Yildirim.

For his part, Yildirim explained that the presence of Turkish troops in Bashiqa was to train and arm local forces, to fight the Daesh group, saying, "the withdrawal of Turkish forces will be achieved later."

"We will not accept any action to threaten Iraq's sovereignty and its territorial integrity. Turkey is exerting effort, to fight terrorist groups and seeking to impose security in the whole region," Yildirim said.

He said that, the meeting with Iraqi officials also agreed on boosting the level of trade and economic cooperation between the two countries, on the reconstruction of areas affected by terrorism.

Yildirim, accompanied by a delegation of Turkish ministers and top officials, arrived in Baghdad on Saturday, for a two-day visit, to end the diplomatic crisis between the two countries.

Yildirim is also expected to visit Arbil, capital of the semi-autonomous region of Kurdistan, to meet with the Kurdish leaders, including the region's President, Masoud Barzani.

Since 2015, hundreds of Turkish soldiers have been deployed in Bashiqa camp, some 30 km north-east of Mosul.

The presence of Turkish troops led to a dispute between Iraq and Turkey, as Baghdad repeatedly said, Turkish forces violated Iraq's sovereignty by entering the country without permission.

However, Ankara said, Turkish soldiers were sent to Bashiqa at the request of Abadi, and that their presence was aimed at training both Peshmerga fighters and local tribal volunteers to combat the militants in Mosul.