BEIRUT, Lebanon — For three decades, Hezbollah maintained a singular focus as a Lebanese military group fighting Israel. It built a network of bunkers and tunnels near Lebanon’s southern border, trained thousands of committed fighters to battle Israel’s army and built up an arsenal of rockets capable of striking far across the Jewish state.

But as the Middle East has changed, with conflicts often having nothing to do with Israel flaring up around the region, Hezbollah has changed, too.

It has rapidly expanded its realm of operations. It has sent legions of fighters to Syria. It has sent trainers to Iraq. It has backed rebels in Yemen. And it has helped organize a battalion of militants from Afghanistan that can fight almost anywhere.

As a result, Hezbollah is not just a power unto itself, but is one of the most important instruments in the drive for regional supremacy by its sponsor: Iran.