TEL AVIV, Israel — U.S. Defense Secretary Chuck Hagel assured Israel on Monday that the Obama administration is committed to preserving and improving the Jewish state’s military edge in the Middle East.

Hagel, on his first visit to Israel as Pentagon chief, also declared that it is Israel’s right to decide for itself whether to attack Iran to stop it from building a nuclear bomb.

Those two messages appeared to form the foundation of Hagel’s effort to improve U.S. relations with Israel, which have been strained in recent years by obstacles to reviving Israeli-Palestinian peace talks and by the threat of an Iranian bomb.

At a news conference with Israeli Defense Minister Moshe Yaalon, Hagel was asked whether he believes it would be advisable for Israel to attack Iran on its own.

“That calculation has to be made by” Israel, he replied after noting, “Israel is a sovereign nation; every sovereign nation has a right to defend itself.”

Hagel did not mention a concern that U.S. officials have voiced in the past, namely, that an Israeli strike would run the risk of igniting a wider war that could draw in the United States.

As evidence of Washington’s commitment to preserving Israel’s so-called qualitative military edge in the Mideast, Hagel said the U.S. will permit Israel to buy various new weapons, including U.S. missiles and advanced radars for its strike aircraft.

Yaalon was asked about reports that the Syrian government has used chemical weapons in its struggle against rebel forces.

He did not specifically say whether Israel believes such weapons have been used, but he said that Syria must not cross the “red line” of allowing any chemical weapons to fall into the hands of what Yaalon called “rogue elements.”