The pagers began beeping just after 3:30 Tuesday afternoon in Lebanon, alerting Hezbollah operatives to a message from their leadership in a chorus of chimes, melodies and buzzes.

But it wasn’t the militants’ leaders. The messages had been sent by Hezbollah’s archenemy, and within seconds the alerts were followed by the sounds of explosions and cries of pain and panic in streets, shops and homes across Lebanon.

Powered by a few ounces of an explosive compound concealed within the devices, the blasts sent grown men flying off motorcycles and slamming into walls, according to witnesses and video footage. People out shopping fell to the ground, writhing in agony, smoke snaking from their pockets.

By the end of the day, at least a dozen people were dead and more than 2,700 were wounded, many of them maimed. And the following day, 20 more people were killed and hundreds wounded when walkie-talkies in Lebanon began mysteriously exploding. Some of the dead and wounded were Hezbollah members, but others were not; four of the dead were children.

Israel has neither confirmed nor denied any role in the explosions, but 12 current and former defense and intelligence officials who were briefed on the attack say the Israelis were behind it, describing the operation as complex and long in the making. They spoke to The New York Times on the condition of anonymity.

Iranian-backed groups including Hezbollah have long been vulnerable to Israeli attacks using sophisticated technologies. In 2020, Israel assassinated Iran’s top nuclear scientist using an AI-assisted robot controlled remotely via satellite. Israel has also used hacking to stymie Iranian nuclear development.

In Lebanon, as Israel picked off senior Hezbollah commandos with targeted assassinations, their leader came to a conclusion: If Israel was going high-tech, Hezbollah would go low. It was clear, a distressed Hezbollah chief, Hassan Nasrallah, said, that Israel was using cellphone networks to pinpoint the locations of his operatives.

“You ask me where is the agent,” Nasrallah told his followers in February in a publicly televised address. “I tell you that the phone in your hands, in your wife’s hands and in your children’s hands is the agent.”

Then he issued a plea.

“Bury it,” Nasrallah said. “Put it in an iron box and lock it.”

He had been pushing for years for Hezbollah to invest instead in pagers, which for all their limited capabilities could receive data without giving away a user’s location or other compromising information, according to U.S. intelligence assessments.

Israeli intelligence officials saw an opportunity.

Even before Nasrallah decided to expand pager usage, Israel had put into motion a plan to establish a shell company that would pose as an international pager producer.

By all appearances, BAC Consulting was a Hungary-based company that was under contract to produce the devices on behalf of a Taiwanese company, Gold Apollo. In fact, it was part of an Israeli front, according to three intelligence officers briefed on the operation. They said at least two other shell companies were created as well to mask the real identities of the people creating the pagers: Israeli intelligence officers.

BAC did take on ordinary clients, for which it produced a range of ordinary pagers. But the only client that really mattered was Hezbollah, and its pagers were far from ordinary. Produced separately, they contained batteries laced with the explosive PETN, according to the three intelligence officers.

The pagers began shipping to Lebanon in summer 2022 in small numbers, but production was quickly ramped up after Nasrallah denounced cellphones.

Some of Nasrallah’s fears were spurred by reports from allies that Israel had acquired new means to hack into phones, activating microphones and cameras remotely to spy on their owners.

According to three intelligence officials, Israel had invested millions in developing the technology, and word spread among Hezbollah and its allies that no cellphone communication — even encrypted messaging apps — was safe.

Not only did Nasrallah ban cellphones from meetings of Hezbollah operatives, he ordered that the details of Hezbollah movements and plans never be communicated over cellphones, three intelligence officials said. Hezbollah officers, he ordered, had to carry pagers at all times, and in the event of war, pagers would be used to tell fighters where to go.

Over the summer, shipments of the pagers to Lebanon increased, with thousands arriving in the country and being distributed among Hezbollah officers and their allies, according to two U.S. intelligence officials.

To Hezbollah, they were a defensive measure, but in Israel, intelligence officers referred to the pagers as “buttons” that could be pushed when the time seemed ripe.

To set off the explosions, according to intelligence officials, Israel triggered the pagers to beep and sent a message to them in Arabic that appeared as if it had come from Hezbollah’s senior leadership. Seconds later, Lebanon was in chaos.