The meeting mainly discussed Iran's nuclear program as well as bilateral and regional economic relations, diplomats said.
Davutoglu was in Afghanistan on Thursday to attend Afghan President Hamid Karzai's oath-taking ceremony. Davutoglu informed Ahmadinejad about developments in Afghanistan and said uncertainty in Afghanistan disappeared after Karzai elected president which he also said was an important new step for Afghanistan's security and stability, diplomats said.
The two countries have also agreed to hold talks with third countries to improve the railroad line from Europe to China which also passes through Turkey and Iran.
Davutoglu is expected to return to Turkey later in the day.