By Matt Spetalnick and Jeffrey Heller
WASHINGTON/OTTAWA (Reuters) - President Barack Obama issued his most direct threat yet of U.S. military action against Iran if it builds a nuclear weapon, but in a message to Israel's leader ahead of White House talks he also cautioned against a pre-emptive Israeli strike.
"As president of the United States, I don't bluff," Obama warned Iran in a magazine interview published on Friday, three days before he will host Israeli Prime Minister Benjamin Netanyahu in Washington.
With the meeting expected to be dominated by stark differences over what Washington fears could be an Israeli attack on Tehran's nuclear sites, Netanyahu said he wanted to preserve the "freedom of action of the State of Israel in the face of threats to wipe us off the map."
Monday's talks are shaping up as the most consequential encounter of U.S. and Israeli leaders in years, with tensions further magnified by Republican presidential candidates slamming Obama over his Middle East policy.
Further complicating the talks is a trust deficit between the two men, who have had a rocky relationship.
There is mounting speculation that Israel, which fears that time is running out to stop Iran's nuclear advance, could act militarily on its own in coming months unless it receives stronger reassurances from Washington.
Netanyahu is trying to convince Obama to more forcefully define the nuclear threshold that Iran must not cross, while the U.S. president wants to convince Israel to hold off on any unilateral strike and give sanctions and diplomacy more time to work.
Both leaders talked tough ahead of their meeting.
"I think both the Iranian and the Israeli governments recognize that when the United States says it is unacceptable for Iran to have a nuclear weapon, we mean what we say," Obama said in an interview with the Atlantic magazine.
Obama repeated the U.S. refrain that "all options are on the table" but spoke in his most direct terms yet of a possible U.S. military response if sanctions and diplomacy fail to curb Tehran's nuclear ambitions.
"It includes a military component. And I think people understand that," Obama said when asked about U.S. intentions on Iran, which insists it is not trying to develop nuclear weapons.
While acknowledging Netanyahu's "profound responsibility" to protect the Israeli people, Obama cited "potential unintended consequences" as he made clear that it would be unwise for Israel to go ahead with any attack on Iran.
"At a time when there is not a lot of sympathy for Iran and its only real ally, (Syria) is on the ropes, do we want a distraction in which suddenly Iran can portray itself as a victim?"
Obama cannot afford to be too tough on Netanyahu, with Republican presidential candidates ready to pounce on any sign of a rift with close U.S. ally Israel. But Obama's aides are also worried that a new war in the Middle East could sow chaos and bring further spikes in global oil prices.
It was unclear, however, whether Obama's sharpened rhetoric on Iran would be enough to placate Netanyahu, who was visiting Canada on Friday before flying to Washington on Sunday.
Netanyahu on Friday ruled out the idea of international talks to prevent Iran from gaining nuclear weapons, a possibility has raised in recent weeks as sanctions have started to take a heavier toll.
"I think the international community should not fall into this trap," he told reporters in Ottawa after talks with Canadian Prime Minister Stephen Harper.
(Additional reporting by Caren Bohan; Editing by Anthony Boadle)