One of the men linked to a planned attack on one of Islam's holiest sites was a scholarship student in New Zealand. He spent five years in the country and left three years ago.
Two men - Talal bin Samran al-Sa'aeidi and Taye' al-Say'ari - accused of links to bombings and other attacks were shot dead following a shootout in the Saudi Arabia capital of Riyadh.
Al-Say'ari - considered one of the most dangerious men in the kindgom for his expertise in making explosives - had studied in New Zealand, according to news agency AP.
He arrived in the country in July 2008 and held a series of student visas before leaving New Zealand in November 2013, Immigration New Zealand spokesman Darren Calder said.
He was a suspect in the August 2015 suicide bombing of a mosque used by members of the security forces in Asir that killed 15 people.
Since then, the officials said, he manufactured two explosive belts used in bombings last year, including a suicide attack near the Prophet's Mosque in Medina.
Officials had stopped the other man twice before because of his suspected involvement in killings in conflict areas, Colonel Bassam Atieh told reporters.
Security forces found two explosive belts, a grenade and chemicals thought to be used for explosives-making in the home where the two suspects were staying.
The country's Interior Ministry officials said a security officer was wounded in the shoot-out.