TEHRAN — Iraq's top general made an official visit to Iran on Sunday and called for the boosting of ties between Tehran and Baghdad, which fought a 1980-1988 war, an military website quoted him as saying.

The armed forces chief of staff, General Babak Zebari, made the remarks during a meeting with General Mohammad Pakpour, the commander of the elite Revolutionary Guards' ground forces.

"The visit aims to develop bilateral relations, as Iran and Iraq are two friendly countries and neighbours, who must have very close relations," Zebari was quoted as saying on the website of Iran's Revolutionary Guards.

"Since the Islamic Republic of Iran is a capable country in many areas, we met with the commander of the Guards' ground forces to consult and develop our cooperation," he added.

The previously unannounced visit came as US forces prepare to leave Iraq by the end of 2011 after the failure of negotiations with the United States on a post-2011 training mission.

Washington has regularly accused the Guards of supporting and arming Iraqi militias hostile to the US presence in Iraq.

The Iraqi government in early November declined offers from Iran and Turkey to train its forces after the departure of American forces.

"We cannot accept one state without another," said an official in the Iraqi prime minister's office. "We prefer that the file of training the forces be outside the framework of neighbouring countries."