A man who pledged allegiance to Al Qaeda sought to kill members of the military and conducted reconnaissance in downtown Cleveland for a planned attack on July 4 -- but the Independence Day plot was foiled after a months-long investigation, federal officials said Monday.

FBI Special Agent in Charge Stephen Anthony said Demetrius Pitts, also known as Abdur Raheem Rahfeeq, was arrested at 10 a.m. Sunday by the joint terrorism task force. Authorities were initially notified about Pitts in 2017, when he lived in Cincinnati and allegedly made statements supporting Al Qaeda and advocating violence against U.S. military members.

"This case illustrated that law enforcement can not sit back and wait for Mr. Pitts to commit a violent act," Anthony said.

Authorities said Pitts made Facebook posts with "disturbing" messages, saying "We as Muslims need to start training like this every day. We need to know how to shoot guns, throw grenades, hand to hand combat," Anthony said during a news conference.

After moving to Cleveland, authorities said Pitts continued to express his "radical ideology." During a meeting last week with an undercover FBI agent, Anthony said Pitts noted "their holiday is coming up."

"What would hit them at their core? Blow up in the, have a bomb blow up in the 4th of July parade," he said.

In the last week, Pitts then went downtown to conduct reconnaissance at Voinovich Bicentennial Park and the Coast Guard station, among other locations, according to officials. He also continued to voice hatred for the military, saying he wanted to "chop off heads and hands."

U.S. Attorney Justin Herdman said Pitts planned to use a van packed with explosives to take places such as St. John’s Cathedral “off the map.”

"He wanted to target people watching fireworks and watching the Fourth of July parade downtown," he told reporters.

VIRGINIA POLICE ARREST 2, ACCUSING THEM OF TRYING TO COMMIT ACT OF TERROR AT A PROM

Besides the alleged plan to attack on July 4, officials said Pitts wanted to also harm military members and families of service members. Herdman said Pitts discussed giving remote control cars packed with shrapnel to children of military members. When he was asked by the undercover FBI agent if he was worried about injuring children, Pitts said, "I don’t care and I have no regrets," according to Herdman.

In recent weeks, Pitts also talked about wanting to travel to Philadelphia, and told the undercover agent Sunday he wanted to conduct reconnaissance for a future attack using a truck packed with explosives, similar to the 1995 Oklahoma City bombing, authorities said in the criminal complaint.

Anthony said the arrest came after multiple conversations showed that Pitts had a desire to do harm. Pitts was born and "radicalized" in the U.S., and wanted to commit violence in the name of Al Qaeda, he added. Pitts faces up to 20 years in prison.

Cleveland Police Chief Calvin Williams said while the alleged plot was foiled, the public should still contact authorities if they notice anything suspicious.

"We need to make sure we keep our eyes and ears open," he said.