Leon Panetta, the U.S. Secretary of Defense, has warned Israel that it is becoming “increasingly isolated” in the Middle East and that it must take some risks in order to insure for peace.

Panetta, who assumed office in July after serving as director of the Central Intelligence Agency, is making his first visit to Israel as the defense chief.

He told reporters while flying to Israel: “It’s pretty clear, at this dramatic time in the Middle East when there have been so many changes, that it is not a good situation for Israel to become increasingly isolated. And that is what has happened.”

He added: “Real security can only be achieved by both a strong diplomatic effort as well as a strong effort to protect your military strength. The important thing there is to again reaffirm our strong security relationship with Israel, to make clear that we will protect their qualitative military edge…as they take risks for peace, we will be able to provide the security that they will need in order to ensure that they can have the room hopefully to negotiate,”

However, he also said that any end to the ongoing conflict would require compromise from all sides.

“The most important thing they can do is go to the negotiating table,” he said. “You are not going to achieve Middle East peace by trying to slam-dunk it at the U.N. The only way you’re going to achieve it is by negotiations,” in a reference to Palestinian’s bid for statehood at the United Nations (which the U.S. vowed to veto at the U.N. Security Council.)

Panetta also advised Israel it must repair deteriorating relations with Turkey and Egypt.

Although Israel said over the weekend that it is willing to directly negotiate with Palestinians, the leadership of the latter refused until Israel ceased building new settlements in East Jerusalem.

Panetta is scheduled to meet with both Israeli and Palestinian leaders this week, followed by a visit to Egypt.