JERUSALEM – In a much-anticipated visit laden with symbols of friendship and words of assurance, President Barack Obama and Prime Minister Benjamin Netanyahu attempted to set aside past differences Wednesday and project a united front over how to tackle the threat of Iran’s purported nuclear weapons program and other regional challenges.

But even as they tried to strike a more conciliatory tone, the two leaders stuck to sharply different timetables for potentially taking military action. Obama said Iran was at least a year away from developing a nuclear bomb, while Netanyahu warned that the Islamic Republic must be stopped sooner.

Nevertheless, the men displayed a measure of personal rapport that has been lacking in previous encounters, with Obama offering a tribute to Netanyahu’s slain brother that nearly moved the prime minister to tears.

And though there appeared to be no substantive change in their positions, Netanyahu offered one of his strongest statements yet of confidence in Obama’s commitment to Israel’s security.

“I’m absolutely convinced that the president is determined to prevent Iran from getting nuclear weapons,” Netanyahu said, though he added his oft-stated declaration that Israel reserves the right to defend itself.

Reassuring Netanyahu, and, perhaps more important, the Israeli public, is a major goal of the trip, whose official slogan is “Unbreakable Alliance.” Obama called the U.S. commitment to Israel’s security a “solemn obligation” and said his administration would ensure that $200 million earmarked for Israel’s Iron Dome missile defense system this year would not be threatened by U.S. budget cuts.

“We will do what is necessary to prevent Iran from getting the world’s worst weapons,” he said. “Israel’s security is guaranteed because it has a great deal on its side, including the unwavering support of the United States of America.”

He vowed to maintain Israel’s qualitative military edge in the Middle East so it can “defend itself, by itself, against any threat.”

The two agree that Iran should not be allowed to develop a nuclear bomb and that military force might be necessary to stop it. But there is a long-standing dispute between them over exactly when to set the deadline for a military strike.

Netanyahu, who last year challenged Obama to publicly announce his “red line” for Iran, seeks an earlier deadline so Israel might still have the option to launch a unilateral attack in the event the U.S. does not take action. “Whatever time is left, there’s not a lot of time,” he said Wednesday.

With its superior weapons capabilities and military, the U.S. believes it can wait longer, and Obama wants to give economic and diplomatic sanctions more time.

In one of the lighter moments of the president’s welcoming ceremony at Ben Gurion International Airport near Tel Aviv, Obama was momentarily unsure of which direction to walk and was told to follow red lines marked on the tarmac. “He’s always talking to me about red lines,” Obama joked, referring to Netanyahu’s warning.

Despite the leaders’ lingering differences, concern about a unilateral Israeli strike has receded in recent months, partly because Iran has buried many of its nuclear facilities so deep that they will be difficult for Israel to reach by itself.

In addition, after Israel’s national election in January, Netanyahu is weaker politically. His new defense minister, Moshe Yaalon, has voiced skepticism about Israel striking Iran without U.S. support.