Venezuelan President Hugo Chavez and Iranian President Mohammad Khatami took turns attacking the United States Friday in Caracas during a state visit by the Iranian leader .