BEIRUT, Lebanon — Saudi Arabia’s powerful deputy crown prince slammed the door Tuesday on the prospect of dialogue with Iran, the kingdom’s regional rival, accusing it of following an “extremist ideology” and seeking to take over the Muslim world.

The prince, Mohammed bin Salman, 31, who is second in line to the throne and serves as defense minister, said Saudi Arabia would fight what he called Iran’s efforts to extend its influence.

“We are a primary target for the Iranian regime,” Prince Mohammed said, accusing Iran of seeking to take over Islamic holy sites in Saudi Arabia. “We won’t wait for the battle to be in Saudi Arabia. Instead, we’ll work so that the battle is for them in Iran.”

The two countries, which stand on opposite sides of the conflicts in Syria and Yemen, are competing for religious and political influence across the Middle East. Saudi Arabia, ruled by a Sunni royal family, is a close ally of the United States and accuses Iran of spreading its revolutionary ideology to destabilize the Arab world. Saudi leaders have taken heart from the Trump administration’s criticism of Iran.