REUTERS - Iran's Supreme Leader Ayatollah Ali Khamenei said on Wednesday that Tehran would not take part in nuclear talks if threatened with military force, state television said, as Iran and world powers try to meet a June 30 deadline for a final deal.

"Holding nuclear talks (with major powers) under shadow of threat is unacceptable for Iran ... Our nation will not accept it ... Military threats will not help the talks," Khamenei was quoted as saying by Iran's English language Press TV.

"Recently two U.S. officials threatened to take military action against Iran. What does negotiation mean under the shadow of threat," he said.

He gave no further details on the threats.

Khamenei repeated his cautious support for the nuclear talks, saying that the country's "red lines" should be respected by the Iranian negotiators.

"Our negotiators should continue the talks with respect to our redlines. They should not accept any imposition, humiliation and threat," the official IRNA news agency quoted him as saying.

Iran says its nuclear program is entirely peaceful and rejects allegations from Western countries and their allies that it wants the capability to produce atomic weapons. It says all sanctions are illegal.

Iran and the six world powers, which struck an interim agreement on April 2 in Lausanne, Switzerland, wrapped up nearly a week of talks in New York on Tuesday.

The negotiations between Iran, the United States, Britain, France, Germany, Russia, China and the European Union will resume in Vienna next week.