SOFIA/JERUSALEM (Reuters) - Israel on Friday condemned the killing of Saudi journalist Jamal Khashoggi in the Saudi consulate in Istanbul, but said cooperating with Riyadh against Iran was a greater priority.

In his first public reaction, Prime Minister Benjamin Netanyahu said Khashoggi's death, which has caused global outrage, was "horrendous" and must be dealt with.

"Yet at the same time I say that it's very important for the stability of the world, for the region and of the world, that Saudi Arabia remain stable," Netanyahu said. "I think that a way must be found to achieve both goals. Because I think that the larger problem is Iran."

He spoke to reporters after a meeting in the Bulgarian city of Varna with the leaders of Bulgaria, Greece, Romania and Serbia.

The Saudi government initially denied Khashoggi had been killed, then that he had died in an unplanned "rogue operation", before the kingdom's public prosecutor last week said the attack had been premeditated.

Earlier, Israeli Energy Minister Yuval Steinitz had said Khashoggi's killing was outweighed by the existential threat of a nuclear-armed Iran, and that "Arab states, including Saudi Arabia, are our allies in recent years against the spread of Iran and against the Iranian nuclear threat".

Iran denies that it is trying to develop nuclear weapons.

The Netanyahu government has reported semi-official Israel-Saudi contacts - never confirmed, and sometimes denied, by Riyadh - since 2014.

Netanyahu made a surprise visit last week to Oman, whose foreign minister then told Gulf neighbours that Israel should be accepted in the region. Other Israeli delegates this week visited the United Arab Emirates.

The Trump administration, which has brought U.S. policy sharply in line with Israel's, has also sought closer relations with Saudi Arabia.

U.S. envoys see Riyadh and other Gulf powers as possible partners in a broad peace deal with Israel that would overtake its long-stalled bilateral negotiations with the Palestinians.