A group of men posing as plainclothes detectives -- wearing suits and with fake gold badges around their necks -- are responsible for a series of home-invasion robberies on Long Island, authorities said Wednesday.

Once inside, the robbers would brandish guns and bind their victims with duct tape or zip ties, telling them they were being restrained "for their protection," Suffolk County District Attorney Thomas Spota said.

Authorities arrested the suspects on March 26 as they were allegedly heading to a Deer Park home that they had targeted next, prosecutors said.

PhotosRecent LI mug shotsDataLI crime stats

Five men, who authorities say met each other while in prison, have been charged with committing seven home invasions since March 2014.

Four of the men were arraigned Wednesday on a 29-count indictment, with each facing burglary, robbery, attempted robbery, conspiracy and criminal impersonation charges.

Spota said the robbers targeted the homes of drug dealers, but sometimes hit the wrong address.

advertisement | advertise on newsday

In June 2014, he said, the men missed the drug dealer living on the second floor of a Bay Shore home, robbing a first-floor family instead.

"They duct-taped and displayed weapons and threatened a grandmother, a grandfather and a 9-year-old boy," Spota said of the Bay Shore robbery. "This is something that has to be taken very, very seriously."

During the arraignment in Riverhead, Assistant District Attorney Tisha Burrows said the suspects typically arrived at the homes "well-dressed and wearing badges."

The men who were arrested are: Michael Stevens, 31, of Valley Stream; Ramon Rodriguez, 31, of Ridgewood, Queens; Demetrius Williams, 27, of Wyandanch; and two upstate men, Jonte Hatcher, 31, of Newburgh; and Mark Powers, 23, of Poughkeepsie.

Attorneys for the four entered not guilty pleas Wednesday. Rodriguez is scheduled to be arraigned on the same charges Friday.

"We will thoroughly investigate their allegations," said Hauppauge attorney Anthony La Pinta, who represents Stevens.

Burrows said Stevens would "orchestrate and plan" the home invasions, which also occurred in Wyandanch, North Bay Shore, North Babylon, Deer Park and Mastic.

State Supreme Court Justice Richard Ambro ordered three of those charged held on $1 million cash bail or $2 million bond. Bail for Williams was set at $750,000 cash or $1.8 million bond.

advertisement | advertise on newsday

Authorities said the crew of thieves ransacked the homes, leaving with an unspecified amount of cash and jewelry.

Detectives cracked the case using cellphone records and wiretaps, authorities said.

In February, cellphone records placed Stevens at each of the robbery locations, and a pattern started to evolve, authorities said. It wasn't immediately clear what led police to Stevens.

The robbery crew ironed out their plans in cellphone conversations. But those conversations ultimately helped police foil the plot, according to authorities.

Police tapped the phones of Stevens, Williams and Rodriguez for about two weeks, then swooped in as the suspects headed to the Deer Park home in two vehicles, Burrows and Spota said.

advertisement | advertise on newsday

Officers arrested Stevens, Williams and Rodriguez, who were in one vehicle. Hatcher and Powers were in a rented vehicle, Burrows said.

Rodriguez and Stevens have prior convictions for first-degree robbery, records show. Hatcher has three felony drug convictions; Powers has been convicted of second-degree attempted robbery.