Current and former U.S. officials say a recent ISIS attack on the tomb of Mohammed in Saudi Arabia -– Islam’s second holiest site -- shows the terror group is now directly challenging the kingdom’s ruling family and trying to topple the monarchy.

“The Saudi king's tiles include 'Protector of the two Holy Cities," said one senior U.S. counterterrorism official. "The message of the attack is that that protection doesn't exist.”

The kingdom’s two holy cities, Mecca and Medina, are home Islam’s two holiest sites, the Qabba in Mecca, which millions of pilgrims visit every year, and the Mosque of the Prophet in Medina, which holds Mohammed’s tomb.

Said the counterterrorism official, “If [the royal family] can’t protect those places –- and people traveling to those cities from across Islam – it calls in to question the fitness of their ruling power and its legitimacy.”

Smoke rises from a parking lot next to the Mosque of the Prophet in Medina, Saudi Arabia on July 5. via Twitter

The Medina attack, one of four launched by ISIS in Saudi Arabia on July 4, the next to last day of the holy month of Ramadan, took place in a parking lot about one-third of a mile from the Mosque of the Prophet. The driver of a car was confronted by four security people and detonated his suicide belt, killing himself and the officers.

A classified U.S. intelligence report called the attempt to attack the Mosque of the Prophet “unprecedented. They got very close."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On the same day, two other suicide bombers struck near a Shia mosque in eastern Saudi Arabia, and a fourth targeted the U.S. consulate in Jeddah. No one was killed in the attacks except the bombers. (On Thursday, the State Department warned of "a potential imminent threat against U.S. citizens in Jeddah" and urged caution.)

The attacks, said the counterterrorism official, were risky for ISIS because they could lead to a crackdown inside the kingdom similar to a 2003-04 Osama bin Laden-inspired bombing campaign in the capital of Riyadh that led to the arrest of hundreds, if not thousands, of suspected al Qaeda operatives.

Bruce Riedel who served as senior director for Near East and North African Affairs at the National Security Council during the al Qaeda bombing wave, called July’s ISIS attacks “by far the most serious attacks in the Kingdom in a decade."

"There is clearly an infrastructure from the Gulf to the Red Sea supporting terrorism,” he said. “The attack on the Prophet’s Mosque on the eve of Eid [the holiday that ends Ramadan] is unprecedented. Bin Laden never attacked the Holy Mosques in his insurrection a decade ago."

A day after the attack, King Salman said Saudi security forces would strike with an "iron hand" against people who "target the country's youth," a confirmation that ISIS had succeeded in recruiting Saudi citizens -- in addition to guest workers -- in the attacks. U.S. intelligence estimates 3,000 Saudis have gone to fight with ISIS, the second highest total of any nation. Only Tunisia has provided more.

Helima Croft, a former U.S. intelligence analyst who's now head of commodity strategy at RBC Capital Markets, said the attacks point up the growing power of ISIS in Saudi Arabia, noting that there have been 26 ISIS attacks in the Kingdom in the past two years. But she notes that most of those attacks have occurred in the eastern provinces where the country's Shi'ite minority resides.

"ISIS has mainly restricted itself to bombing Eastern mosques -- Shi'a mosques -- and has avoided targeting the royal family or the energy infrastructure," said Croft.

Official U.S. assessments of the situation in recent months have warned of increasing violence.

A March 2016 report by the State Department's Bureau of Diplomatic Security cautioned: "Multiple attacks since January 2015 have been linked to ISIL or inspired by ISIL rhetoric. There were four ISIL-linked suicide bombings at mosques: two Shia mosques in Qatif and Dammam during May 2015, an MOI Special Security Forces Sunni mosque in Abha in August 2015, and a Shi'a mosque in Najran City in September 2015.”

Croft notes that the attack on Medina comes only nine months after the Mina Stampede, in which 2,200 Muslim pilgrims were suffocated or crushed during the Hajj, the annual Muslim pilgrimage to Mecca.

"Coming off the Hajj tragedy, the question is can the royal family provide stability to the Saudis themselves as well as pilgrims," Croft asked. "In the Muslim world, their leadership is tied to their role as protector of two holy sites."

Analysts both inside and outside the U.S. government also say the Saudis have handicapped themselves by "kneecapping" -- as one outside analyst put it -- the country's most skilled counterterrorism official, Crown Prince Mohammed bin Nayef, who rose to prominence by thwarting al Qaeda operations in the kingdom over the last decade.

Bin Nayef, who has been personally close to U.S. intelligence and counterterrorism officials, is locked in a battle for royal primacy with Prince Mohammed Bin Salman, the king's son and deputy crown prince. Said one analyst who feared retaliation if identified, "He's been marginalized at this point." He added that bin Nayef’s effectiveness has been mitigated by rumors of poor health and even drug use.

One source said bin Nayef has been pushing back against the effort to sideline him and demanding his foes stop spreading rumors that he’s sick.

Losing bin Nayef's counsel, the analyst added, couldn't come at a worse time. As the State Department pointed out in its annual report on terrorism two months ago, ISIS has begun directly confronting Saudi security forces, carrying out "successful attacks against Saudi security forces by focusing attacks on border outposts, police stations, and military facilities."

State, in an earlier assessment, left no doubt as to the terror group’s ultimate goal, "The Islamic State of Iraq and the Levant (ISIL) has become a potentially destabilizing factor that has direct implications for security in the Kingdom. ISIL has voiced openly its desire to take over the Kingdom of Saudi Arabia (KSA)."