(AP Photo/Vahid Salemi)
The hard-line president, meanwhile, insisted his country will not retreat "even an iota" on its nuclear program.
The Iranian state-run news agency said Hossein Mousavian was arrested Monday in the capital, Tehran.
Iran did not officially release any details about the specific charges against him. But the semiofficial Fars news agency -- which is deemed close to the elite Revolutionary Guards -- said Mousavian could face espionage charges.
"The probable charge of espionage activities may be raised against him," the agency quoted an unidentified official as saying. "Mousavian was arrested because of connections and exchange of information with foreign elements."
Fars said Mousavian was summoned to the prosecutor's office Monday, where he was arrested and taken to the notorious Evin prison in Tehran.
"Mousavian's case is under initial investigation and interrogation, and his release is unlikely," the agency said.
Mousavian was a member of the Iranian nuclear negotiating team until 2005 and before that served as Iran's ambassador to Germany. He was a close ally of former president Akbar Hashemi Rafsanjani.
Ahmadinejad, who defeated Rafsanjani in the last presidential elections, replaced the nuclear negotiating team, including Mousavian, when he assumed power two years ago.
Rafsanjani, a high-ranking cleric, holds seats on two of Iran's most important government bodies and is considered Ahmadinejad's main political rival. Seen as a more pragmatic conservative than Ahmadinejad, Rafsanjani has taken a somewhat more conciliatory stance toward the United States and its allies over Tehran's nuclear program.
Iran did not release any details about the specific charges against Mousavian, but in such cases they usually involve violating national interests or state security interests or treason. These cases are heard before Iran's Revolutionary Courts and carry sentences up to life in prison.
Ahmadinejad -- who is locked in a bitter standoff with the West over its disputed nuclear program -- warned Wednesday that Iran would "cut off the hands of invaders" if attacked.
Speaking to a crowd in Kerman, about 650 miles southeast of Tehran, the president said Iran would continue to resist attempts to curtail development of nuclear technology for peaceful, electric-generating purposes.
"Our nation will not give up its right even an iota," he said. "In the important nuclear issue, implementation of justice is the demand of Iranian nation. Our nation says, 'laws for everyone, rights for everyone.'"
His comments came ahead of another U.N. Security Council deadline for Iran -- this one in late May -- to halt uranium enrichment program or face more sanctions.
The Security Council first imposed limited economic sanctions on Iran in December, then strengthened them in March over Iran's continued refusal to suspend enrichment.
The enrichment process can produce fuel for nuclear reactors or the material for atomic bombs. The U.S. and some of its allies claim Iran is secretly trying to develop nuclear weapons; Tehran denies it.