As the Fourth of July neared, the White House and FBI headquarters decided to shut down two ISIS-inspired terror cells that appeared to be ratcheting up towards attacks, a senior law enforcement official told The Daily Beast.

This year’s Fourth of July was particularly worrisome because it comes during the Muslim holiday Ramadan, which ISIS has declared to be a time when jihad is all the more imperative.

“No acts of worship are equal to jihad, and jihad in Ramadan is not matched by jihad in other months,” ISIS spokesman Abu Muhammad al-Adnani said recently.

If you have been paying attention to the news in recent days, you have heard talk about a July the Fourth threat; CNN, in particular, has gone wall-to-wall with it. We are going from lone wolves to lone wolf packs and the increasing danger presented by cells like these two—combined with the obvious symbolism of Independence Day—goes a long way toward explaining the heightened alarm.

The more serious threat at the approach of this double holiday appears to have come from a cell based in the New York area that is said to have been researching the construction of pressure cooker bombs, complete with timing mechanisms.

Such bombs were used with devastating effect at the Boston Marathon and officials worried that the New York cell might seek to do the same in the crowds that gather for the city’s annual Fourth of July fireworks display.

The criminal complaint filed against one member of the New York cell, 20-year-old Munther Omar Saleh of Queens, suggests that he may have been taking orders directly from ISIS. He referred to ISIS as “dawla”—Arabic for the “state”—when communicating with a confidential informant.

“I’m very sorry, but I was ordered by dawla officials not to talk to anyone,” Saleh said, according to the criminal complaint.

The other cell that worried officials as the holiday approached was comprised of two men from Boston and a third from Rhode Island. The three allegedly plotted at one point to behead anti-Muslim agitator Pamela Geller in New York.

One of the trio, 26-year-old Usaamah Rahim of the Boston area, obtained a 9-inch fighting knife on May 27, followed three days later by a second Marine fighting knife and a 13-inch “Spec Plus” fighting Knife, all via Amazon.com.

On May 31, Rahim met with a fellow Bostonian, 25-year-old David Wright, and 24-year-old Nicholas Rovinski of Providence on a deserted Rhode Island beach. Rovinski had originally connected with them through Facebook. His call to arrange the huddle was recorded by authorities.

“Like I said, I’ve been wanting to meet up with you to discuss some important aspects that I think you might, you might enjoy,” Rovinski said.

“Oh, that sounds so wonderful,” Wright replied.

Wright then had texted Rahim, saying that Rovinski “wishes to speak on some juiciness.”

“LOL,” Rahim replied.

The three allegedly stood in a rainstorm and discussed beheading Geller in New York.

At 5 a.m. on June 2, Rahim was recorded telephoning Wright to announce that he had decided not to join the “vacation” to the Big Apple. He suggested that he would instead be going after police officers close to home.

“I can’t wait that long, I can’t wait that long man,” Rahim said according to the complaint. “I’m going to be on vacation right here in Massachusetts… I’m just going to, ah, go after them, those boys in blue. ’Cause, ah, it’s the easiest target and, ah, the most common is the easiest for me.”

Rather than let the scheme play out any longer, the FBI and the Boston police approached Rahim on the street later that same day.

“Rahim took out one of the knives he had purchased from Amazon.com when he saw the officers and agents,” the complaint notes. “One of the officers told Rahim to drop his weapon and Rahim responded, ‘You drop yours.’ Rahim moved towards the officers while brandishing his weapon, and he was shot by law enforcement.”

The authorities scooped up Wright within hours and Rovinski ten days later. The two were charged with conspiring to provide material support to ISIS.

Down in New York, the local Joint Terrorist Task Force (JTTF) prepared to shut down what appeared to be developing into a significant bomb plot.

Back on March 22 and again the next day, a Port Authority Police Officer had observed Munther Omar Saleh walking around the New Jersey end of the George Washington Bridge. He was detained and the JTTF interviewed him.

“Saleh stated that he had gone to New Jersey to visit a friend,” the subsequent complaint says. “When asked what he thought of ISIS, Saleh stated that he was not sure and had heard they were murdering children.”

The alleged statements were at odds with the many declarations in support of ISIS Saleh had been making online since 2014, when he posted on the day before the 13th anniversary of 9/11 that al Qaeda “could be getting too moderate.” He subsequently praised ISIS for its “high end videos, great weaponry and quality fighters.”

The complaint notes that Saleh had been studying at Vaughn College of Aeronautics and Technology near LaGuardia Airport in Queens. He seemed to be less interested in what made a plane fly than in what could make a bomb go off.

“In shah Allah these work,” he wrote of some circuitry in a March 7 e-mail, adding a smiley face.

On May 7, Saleh e-mailed himself information he had found online regarding the construction of a pressure cooker bomb. He also made numerous Internet searches for weaponry, disguises and drones. He was observed on May 19 purchasing the kind of digital watch that can be used in a bomb.

On May 28 and May 31, Saleh conducted online searches regarding various New York City landmarks. He was contacted online by a confidential informant who was posing as an ISIS supporter.

Saleh asked the informant if he was in America and he replied that he was.

“Well, I’m in NY and trying to do an Op,” Saleh said, according to the complaint.

In a subsequent conversation, Saleh told the informant that he had been instructed by dawla—ISIS—not to speak to anyone. All contact then ceased.

“Saleh’s final communication to [the informant] indicated that he is taking orders from persons he believes are ISIS officials and that pursuant to their orders he could not communicate further,” the complaint states.

The big worry was what other orders Saleh might be getting from ISIS, most particularly with the Fourth of July approaching. He was kept under intense surveillance.

Early on the morning of June 13, FBI agents and cops followed Saleh and two other men in a green Jeep whose license plates did not match the vehicle. The agents watched the men pull into a car wash and vacuum out the inside of the Jeep. The men then performed a series of what the complaint terms “anti-surveillance measures,” such as “driving quickly through a parking lot with the vehicle’s lights off.”

At 4 a.m., the Jeep stopped near the entrance to a Queens expressway. Saleh and one of the other men hopped out and took several steps toward a law enforcement vehicle that was tailing them. They hopped back inside only to jump out again.

“Saleh charged the law enforcement vehicle with a knife in his hand,” the court papers say.

The agent threw the vehicle in reverse, avoiding a confrontation until other agents and cops arrived. Saleh and the other man were arrested. Saleh is said to have waived his Miranda rights.

“Saleh stated that he had pledged allegiance to ISIS and was a ‘full fledged’ member of ISIS,” according to the complaint.

Authorities checked Saleh’s cell phone and found text conversations with a man named Fareed Mumuni. Saleh had been observed meeting Mumuni in downtown Manhattan. The texts now seemed to make clear the nature of their interactions.

“Saleh and Mumuni discussed the prospect of attacking law enforcement,” the court papers say. “Saleh instructed Mumuni that the best option was to use a bomb and then fight afterwards. After Mumuni asked for more guidance, Saleh wrote to use a bomb and then run over members of law enforcement with a vehicle, seize the weapons of any victims, and use the weapons to shoot at other victims.”

On June 12, hours before the arrest, Saleh had texted Mumuni to say that he had decided to give his parents a choice. They could either to let him go off to fight with ISIS “or you watch me kill non-Muslims here.”

“May Allah make it easy for you,” Mumuni replied.

Mumuni and at least one other member of the group were still out there and the authorities might have just kept them under surveillance were it not for the worry that something might be planned for the double Ramadan / Fourth of July holiday.

At 6:35 a.m. on June 17, FBI agents and cops arrived at Mumuni’s house on Staten Island to execute a search warrant. His mother and sister came to the door. Mumuni then charged down the interior staircase.

“The officers, who clearly identified themselves as members of law enforcement, repeatedly directed Mumuni to move to a couch in the living room,” the complaint says. “Mumuni ignored the officers’ commands and instead suddenly lunged at the officers with a large kitchen knife. As the officers attempted to restrain Mumuni, he “repeatedly attempted to plunge the kitchen knife into the torso of an FBI Special agent.”

The agent is said to have been stabbed seven times but his body armor saved him from serious injury. Mumuni was disarmed and arrested.

Mumuni confessed to “discussing the construction of a pressure cooker bomb with Saleh,” according to the complaint, which adds about the stabbing, “Mumuni admitted that today’s attack was premeditated and that he kept the knife he used to attack the FBI Special Agent wrapped in a T-shirt in his bed for just such an occasion.”

The following day, on June 18, the agents and cops arrested 21-year-old Samuel Rahamin Topaz at his home in New Jersey. Topaz, whose parents are Christian and Jewish, had first come to the attention to the authorities after somebody close to him—called only Person A in the criminal compliant—contacted the JTTF. Person A was fearful that Topaz was falling under the influence of jihadi extremists.

Those extremists allegedly included Saleh, termed CC-2 in the court papers. CC-2 came by the house on at last two occasions to pray with Topaz.

“CC-2 made Person A feel very uneasy around him,” the complaint states.

Topaz does not seem to have joined in any plans for a stateside attack. His focus seems to have been flying off to join ISIS, which he said had made him a fabulous offer.

“[ISIS] promised him $7,000 a week and that he could have four wives,” the complaint says.

The complaint reports that Topaz and Saleh exchanged 18 phone calls and 63 text messages between February and June. Saleh may have been a recruiter as well as an aspiring bomb maker.

Topaz’s plans were frustrated when Person A hid his passport and then when Saleh was arrested. Topaz himself was now charged with conspiring to provide material support to ISIS.

As the Fourth of July arrives, officials were saying there are no confirmed threats to the fireworks display in New York.

But the authorities remain on high alert. Among the newest cops standing vigilant will be NYPD Police Officer John Healey, who graduated form the police academy on Thursday. His older brother, Police Officer Kenneth Healey, is still recovering from injuries he received when he was attacked by a jihadi maniac armed with a hatchet in November.

From young Healey to his fellow cops to the JTTF to the White House to FBI headquarters everybody is hoping that there is not some other plot, waiting to announce itself in the street as the fireworks burst high overhead.