(UPI) — Two Israeli men accused of spying against Saudi Arabia went on trial Monday.

Prosecutors say the accused spies used phony Jordanian passports to enter Saudi Arabia after their visas expired. They are also accused of gathering information for Israel’s Mossad intelligence agency and plotting a 2014 terrorist attack, the Saudi-based Al Arabiya reported.

The Saudi court, which tries suspected terrorists and activists, is considering the charges for the men. Prosecutors said they attempted to carry out a terror attack during the Haj pilgrimage four years ago.

Saudi Arabia, the birthplace of Islam, does not officially recognize Israel. The two countries have fought for years over Arab lands captured in the 1967 Middle East war. For years, Saudi Arabia has made normalizing relationships with Israel contingent on Tel Aviv’s withdrawal from those lands.

More recently, there has been speculation that the two countries may work together against Iran over rising tensions between Riyadh and Tehran.

U.S. Secretary of State Mike Pompeo traveled to Saudi Arabia and Israel last week to discuss the Iran nuclear deal. The United States, Israel and Saudi Arabia each accuse Iran of trying to dominate the region.