CHICAGO – Dozens of private and city-owned security cameras played a critical role in helping investigators unravel “Empire” actor Jussie Smollett’s alleged hoax attack, police and prosecutors say.

Officials say investigators were suspicious of Smollett from the outset.

Officers were dispatched to investigate a brutal racist, homophobic attack on Smollett early on the morning of Jan. 29. During the attack, he said, two men threw a rope around his neck, in the manner of a noose.

When officers arrived at the actor's apartment in Chicago's swanky Streeterville neighborhood about 40 minutes after the alleged beating, one detail caught their eye.

“Chicago Police Officers observed that Smollett had a rope draped around his neck,” said Risa Lanier, a Cook County State’s Attorney. “This was captured on police body worn camera. Seconds later, Smollett asked police to shut off the cameras.”

Still, police continued for nearly three weeks to publicly identify Smollett as a victim of a possible hate crime.

That all changed after police arrested two U.S.-born brothers of Nigerian descent – Abel and Ola Osundairo – as they arrived in Chicago Feb. 13 from a two-week trip overseas.

Abel, 25, was a close friend and personal trainer of Smollett who provided the actor with the club drug Ecstasy, prosecutors say. Both brothers had worked on the set of "Empire."

Smollett was charged this week with disorderly conduct by filing a false police report.

Prosecutors say he falsely told police that the perpetrators flung racial and homophobic slurs as they pummeled him, poured a chemical substance on him, and screamed “This is MAGA Country,” a reference to President Trump’s 2016 campaign slogan.

He remains free on $100,000 bond as he awaits trial.

The Osundairo brothers initially resisted giving police much information. But as investigators prepared to charge them with a hate crime, prosecutors say, they came clean.

Eventually, the Osundairos' defense attorney Gloria Schmidt told police her clients would give police a video statement.

The brothers said Smollett paid them $3,500 to assist with a carefully choreographed attack, police and prosecutors say. They also said Smollett was involved in sending a threatening letter addressed to him at the Chicago studio where "Empire" is filmed. The letter arrived at the studio one week before the alleged hoax attack.

Police Superintendent Eddie Johnson said Smollett was unsatisfied with his salary for the Fox television show and wanted to use the attack to raise his profile.

Investigators say they learned many of the details of the alleged conspiracy through their conversations with the Osundairos.

The brothers might never have made it on to detectives' radar if it weren't for an array of roughly 55 city, business and doorbell cameras that captured snippets of the men's movements as they came to and from the crime scene.

“It was because of these (police) cameras, our investment in technology in the city of Chicago and the great assistance from the community with those other cameras that led us to a really solid timeline of where our two persons of interest went,” said Commander Edward Wodnicki, who led the team of detectives investigating the case.

Police started with a grainy video that showed only the silhouette of two men walking away from the scene soon after the attack. Wodnicki said it was just enough for police to begin tracking the Osundairo brothers “forward” from the crime scene.

Footage showed the brothers jumping into a cab not far from where Smollett said he was attacked. Investigators were able to track down the cab driver, who had a security camera inside the taxi that captured the brothers' faces.

The brothers took the cab several miles to the city’s North Side before they “abruptly stopped the cab” and began walking, police say.

Suspended:Jussie Smollett suspended from ‘Empire’ after prosecutors said he faked attack to boost salary

Bogus reports:Jussie Smollett hate attack claim: 'Bogus police reports cause real harm,' police say

Smollett goes to court:Jussie Smollett directed brothers to pour gas on him and yell slurs, prosecutor says

At that point, Wodnicki said, investigators began looking backward in time in hopes of spotting the brothers in video footage near Smollett’s home before the alleged attack occurred.

They would find footage of the brothers getting out of a taxi just blocks from the crime scene, Wodnicki said.

That taxi, which was also equipped with a camera, provided police with additional video footage of the Osundairos, Wodnicki said. Investigators backtracked the brothers' movements to the point where they hailed the taxi – about two miles from the crime scene in the city's Old Town neighborhood.

Security or police cameras in Old Town captured footage of the brothers arriving in the neighborhood by Uber shortly before they got into the taxi, Wodnicki said.

From there, Wodnicki said, it took a only search warrant to figure out that Ola Osundairo had hailed the ride using his smartphone from the brothers' home on the city's North Side.

That proved to be "the lead we needed to identify the two persons of interest," Wodnicki said.

Through the brothers’ eventual cooperation – as well as phone records – investigators were able to further establish that Smollett and Abel Osundairo spoke briefly by phone a little more than an hour before the attack, according to Lanier, the prosecutor.

Smollett told Abel Osundairo during that call that the attack should be carried out at 2 a.m. at an already scouted location near the actor’s home, Lanier said. Minutes later, Ola Osundairo hailed the Uber and the brothers started making their way to the crime scene.

Less than 18 hours after the incident, Smollett and Abel Osundairo traded brief phone calls, Lanier said. The brothers then boarded a flight for their overseas trip. The next day, Smollett made a nearly 9-minute call to Abel in Turkey, Lanier said.

“The way that they carried this out, there was never a thought in their mind that we would be able to track (them) down," Johnson said. He credited the detectives' intense focus on helping crack the case.

While the Osundairos allegedly assisted in the scheme, Wodnicki indicated that police see them as victims whom Smollett was attempting to wrongly implicate in a hate crime. Prosecutors have not commented on whether the brothers have been offered immunity for their cooperation.

Bo Dietl, a former New York Police Department detective, called the brothers “scumbags” for taking part in the alleged hoax. Still, he said, it would be understandable if prosecutors didn't go after them.

“With cooperating witnesses, sometimes you have to weigh out culpability,” Dietl said. “In reality, you have to look at who is the main person. Sometimes you have to give a person a play to get to the main culprit.”

Johnson lambasted Smollett for trying to take "advantage of the pain and anger of racism to promote his career.”

In the days after Smollett reported the attack, celebrities and politicians including 2020 Democratic presidential hopefuls Senators Corey Booker and Kamala Harris expressed outrage.

Over the three weeks police were investigating the alleged hoax attack, Chicago endured at least 18 killings and dozens of shootings.

Among the victims of gun violence were 1-year-old Dejon Irving, who was shot in the head on Feb. 7 as he sat in a car with his siblings and grandmother. The boy remains in critical condition. Police believe the assailants were targeting his mother.

While Dejon’s shooting received little national media attention, Smollett’s case attracted media coverage from around the globe.

“I just wish that the families of gun violence in this city got this much attention, because that’s who deserves the amount of attention we’re giving this particular incident,” Johnson said.