BAKU- Azerbaijan said on Thursday it was planning to build a railroad to the Armenian boarder soon to transport goods to its ally Turkey and the Azeri exclave of Nakhchivan after securing territorial gains in a conflict with ethnic Armenian forces.

Azerbaijan plans to build a line from the town of Horadiz to Zangilan on the border with Armenia, from where it will use trucks to move goods to Nakhchivan and Turkey, Azeri President Ilham Aliyev said.

"I am certain that we can already start delivering goods from Azerbaijan to Turkey and Nakhchivan through Armenia, as well as in the opposite direction," the Azerbaijan State News Agency quoted Aliyev as saying.

Aliyev did not specify what goods Azerbaijan would send. Its exports are dominated by oil and gas, but it also sells sugar, fruit and metals.

The railroad's construction could take up to two years, Aliyev said, speaking at a meeting with Turkish Defence Minister Hulusi Akar.

There was no immediate comment from Armenian officials.

A Russian-brokered deal last month halted a six-week conflict between Azeri and ethnic Armenian forces over the region of Nagorno-Karabakh and its surrounding areas, securing territorial gains for Azerbaijan.

Under the agreement, Armenia must provide Azerbaijan with a safe transport link through its territory to the exclave of Nakhchivan, which borders Turkey.

(Reporting by Nailia Bagirova in Baku and Nvard Hovhannisyan in Yerevan; Writing by Gabrielle Tétrault-Farber; Editing by Tom Balmforth and Andrew Heavens) ((Gabrielle.Tetrault-Farber@thomsonreuters.com;))