The Iranian president had been quoted by the state-run IRNA agency as saying before he left on Tuesday that Iran and Afghanistan had always "stood next to each other as brothers and friends."

After talks at the presidential palace, Karzai told reporters that Afghanistan was close to Iran but also a friend of the United States, which has criticised Kabul's relationship with Tehran.

'Great happiness'

"If Afghanistan can bring them closer, that will be a great happiness for Afghanistan - but it depends on both sides," he said.

Karzai has always spoken positively of relations with Shia Muslim Iran, which was a staunch opponent of the government formed by the Sunni Muslim Taliban movement between 1996 and 2001.

On the eve of talks with George Bush, the US president, last week, Karzai described Iran as "a helper and a solution" to problems in the country, pointing to co-operation on security issues and drug enforcement.
  
Bush responded several days later by saying he "would be very cautious about whether or not the Iranian influence there in Afghanistan is a  positive force". 

Robert Gates, US defence secretary, said in June that given the  large number of weapons coming into Afghanistan from Iran, it was hard to believe "that it's taking place without the knowledge of the Iranian government".
  
The charge has been strongly denied by Tehran and Karzai played them down, saying that had not be proven.

Ahmadinejad's visit is his first to Afghanistan and follows Karzai's trip to Tehran in May 2006. He will travel to Turkmenistan and Kygyzstan after the meeting.

Source: Agencies