Deportation orders failed to oust two illegal immigrants who are now up on drug charges and under investigation in the July 4 shooting death of a Lawrence grandmother — in an alarming case that critics say illustrates a revolving immigration door with dangerous consequences.

Dominican Republic nationals Wilton Lara-Calmona and Jose M. Lara-Mejia were arrested on drug charges by police investigating the shooting death of Mirta Rivera, 41. The Lawrence nurse was killed in her sleep by a gunshot fired through the ceiling from an upstairs apartment, where both men lived.

But Immigration and Customs Enforcement records reviewed by the Herald show the men shouldn’t have been in the country in the first place.

Lara-Calmona, 38, was deported in April 2012 and arrested for re-entering the country last November, the records show.

Lara-Mejia, 35, was nabbed crossing the border in August 2013 and ordered deported in April 2014, but had remained in the country illegally.

ICE spokesman Shawn Neudauer confirmed that Lara-Mejia “was ordered removed by a federal immigration judge on April 9, 2014, after failing to appear before the immigration court. He was considered an ICE fugitive until his July 4, 2015, arrest by local authorities in Lawrence, Massachusetts.”

Rivera’s shocking shooting death — killed as she lay in her bed — comes as the country’s immigration policies are under renewed scrutiny. Only days before the Lawrence shooting, an illegal immigrant previously deported five times allegedly shot and killed a young woman walking on a busy San Francisco pier with her father.

“Basically we’re hanging a huge ‘welcome back,’ sign for them,” said Jessica Vaughan, director of policy studies with the Center for Immigration Studies. “Illegal immigrants who have already been deported see a reason to come back because they are not afraid of immigration enforcement once they get here.”

Vaughan said crime involving illegals could be preventable, but the Obama administration has encouraged officials to look the other way when it comes to enforcing immigration laws — like the law that carries a two-year prison sentence for illegal re-entry, 10 years when it involves a felony crime.

“There is a law on the books intended to make people think twice after they get deported, but the problem is the U.S. attorneys often will not prosecute until someone has been deported multiple times,” Vaughan said.

Lara-Mejia, Lara-Calmona and Christopher Paganmoux, 22, who all live on the second floor above Rivera on Exchange Street, were charged with trafficking heroin and cocaine after police said they found drugs as well as a “clear and obvious” rifle bullet hole in Lara-Mejia’s second-floor bedroom, according to police records.

Police arrived at 4:26 a.m. at the home of Rivera to find her “lying supine on the bed, pulseless, not breathing, eyes fixed front, staring straight at the ceiling,” wrote Lawrence police officer Frank Bradley.

Bradley quickly found a hole in the ceiling above her with “plaster hanging down.” Bradley then burst into the apartment upstairs, where, “the smell of fresh burnt gunpowder was strong and evident,” and rounded up the three suspects from their bedrooms.

Officers also searched the apartment and outside the building, found a Sears and Roebuck .270 bolt action rifle that matched the bullet found in Rivera’s mattress, according to the police report.

All three men have been held on high bail since their arraignment, but their lawyers deny that they have any connection to their neighbor’s death. A spokeswoman with the Essex District Attorney’s Office said Friday that the incident is still under investigation.

But according to Vaughan, lax immigration enforcement is the reason two of those three were in the apartment full of drugs and gunsmoke that day.

“The Obama administration is being way too generous and allowing people who are public safety threats to remain here,” she said.