Few terrorist groups ever succeed in taking over a country. The Lebanese Shia group Hezbollah has done so this year, but at its moment of triumph it faces the most severe challenges it has ever faced.

Hezbollah, or the Party of God, was created in 1982 by Syrian and Iranian intelligence agents after one of Israel’s invasions of Lebanon. It rapidly gained support among the angry and downtrodden Shia community, which had been at the bottom of Lebanon’s archaic political and economic system for decades. Hezbollah suicide bombers blew up the U.S. Marine and French paratrooper headquarters in October 1983, driving America and Europe out of Lebanon. Then they waged a long and difficult war against Israel until it too left in defeat in 2000. Another bloody war with Israel ended just five years ago in a stalemate. Along the way Hezbollah held dozens of foreigners hostage, murdered a CIA station chief, hijacked airliners, and blew up Israeli targets as far away as Argentina.

But it also became a political party in Lebanon and gradually acquired more and more political power. In 2008 it flexed its military power by briefly taking over most of Beirut for a few days, then drew back to let the message sink in that Hezbollah can do what it likes. This year the party succeeded in getting its candidate for prime minister, Najib Mikati, selected, and it now effectively dominates the government.

It has an arsenal of thousands of rockets and missiles aimed at Israel. Its leaders claim they can hit any city in Israel, even the port of Eilat on the Red Sea. Without doubt it can fire into Tel Aviv and Haifa, Israel’s two large cities on the Mediterranean Sea.

At this moment of success, however, the United Nations Special Tribunal for Lebanon has delivered sealed indictments and arrest warrants to the Lebanese government for the arrest of four Hezbollah members wanted for the murder of former prime minister Rafiq Hariri in 2005.

At the top of the list is Mustafa Badreddine, one of the most notorious terrorists in the world. He is cousin and brother-in-law to Imad Mughniyah, who died in a car bomb in Damascus in 2008. Mughniyah is infamous for his decades of terror attacks. Together the two planned and executed the attacks on the Marines and French paratroopers in 1983, and then car bombings of the U.S. and French embassies in Kuwait later that year. Badreddine was captured and imprisoned in Kuwait for those attacks.

For the next decade and a half Hezbollah tried to get him freed by hijacking airplanes and kidnapping hostages in Lebanon. Finally he got out when Iraq invaded Kuwait in August 1990 and opened the jails. With Iranian assistance he got back to Lebanon. He is said now to have taken over Mughniyah’s job of running Hezbollah’s external-operations branch and is a member of its ruling shura council.

Hezbollah’s leader, Hassan Nasrallah, has accused the UN tribunal of being an American and Israeli conspiracy against Lebanon. Hezbollah has made it clear it will not cooperate with the judicial process and will prevent the Lebanese government from doing so as well. The government is supposed to arrest the four suspects by the end of July so they can stand trial in The Hague. If they are not turned over, the trial will take place without them.

An even more dangerous challenge for Hezbollah is the revolution next door in Syria. The Syrian regime of President Bashar al-Assad is in deep, probably fatal trouble. Four months of demonstrations have isolated the Assad regime and wreaked havoc on the economy; and despite violent repression, the protests are getting bigger and bigger. With the advent of the Muslim holy month of Ramadan in August, the unrest is certain to get even more intense.

Under Hafez Assad, Hezbollah was created; under his son Bashar, it has matured. Without Syrian help the group would never have become the monster it is today. The deputy secretary-general of Hezbollah and one of its founders, Sheik Naim Qassem, wrote in 2007 that Syria is “the cornerstone” of Hezbollah’s survival in the region. While there are differences between Syria and Hezbollah, he said the relationship is a “necessity” for Hezbollah.

Worse, the next Syrian government is likely to be dominated by the Sunni majority in the country, not the Alawi minority that the Assads come from. A Sunni Syrian regime, especially one heavily influenced by the Muslim Brotherhood, will be a fierce enemy of Shia Hezbollah, particularly after it has been exposed as the assassin of the popular Sunni former prime minister Hariri. Both Iran and Hizbullah will lose their most important ally in the Arab world.

Hezbollah will still dominate Lebanon and will still have its Iranian benefactor. It will remain the best armed terrorist group in the world. But it will now face international isolation, a UN-driven judicial process, and a hostile neighbor next door. Hezbollah knows well how easy it is to destabilize Lebanon from a base in Syria; soon it may be on the receiving end of the very process that made it triumphant.