TEHRAN, Iran — Iran's top leader says he has not prohibited talks with the U.S. but urged caution with any possible dialogue.

Ayatollah Ali Khamenei described the American government as untrustworthy. His comments were posted on his website Sunday.

Iran's president-elect, Hasan Rouhani, has pledged to follow a path of moderation and interaction with the outside world. Khamenei told outgoing President Mahmoud Ahmadinejad and other top government officials that Iran believes in interaction with the world, but it must determine the goals of its adversaries. Otherwise it will suffer, he said.

Iran and the U.S. are in deep disagreement over Iran's nuclear program.

Rouhani, who won a landslide victory in the June 14 presidential election, will be sworn in Aug. 4. Iran sent invitations to world leaders to attend his inauguration.