(CNN) -

Thirty-two Turkish drivers believed kidnapped by militants in Iraq last month have been released, Turkey's foreign minister said Thursday.

The drivers were on their way to Irbil in northern Iraq on Thursday, where they were expected to board a plane and fly to Turkey's capital, Ankara, Turkish Foreign Minister Ahmet Davutoglu told reporters during a televised news conference.

Turkey previously said it believed militants with the Islamic State in Iraq and Syria kidnapped a group of Turkish truck drivers in northern Iraq on June 10. The drivers had been hauling fuel from Turkey to a plant in Mosul, Iraq, when they were abducted, according to the Turkish foreign ministry.

A day later, ISIS militants raided the Turkish Consulate in Mosul, abducting a number of consulate staff, Turkey said.

More than 40 consulate staff members still are missing, and the Turkish foreign ministry is working on gaining their release, Davutoglu said Thursday.