An illegal immigrant accused of murder is stuck on U.S. soil after officials in his home country refuse to accept his deportation because of his criminal history.

David Paneque, 29, was allegedly caught on video fatally shooting his friend Leandro Lopez, 31, while the two were at a parking garage in Miami last month. As Paneque sits in jail awaiting trial, it's been revealed by the Miami Herald that he was supposed to be deported to Cuba nearly two years ago, but the country wouldn't take him back because of his extensive criminal past.

Paneque, who has previous ties to the gang Sur-13 and went by the nickname "Psycho," was first arrested in 2007 when he stabbed a man several times while robbing him. He was sentenced to 10 years in prison for attempted murder and armed robbery, and he picked up another criminal charge while in jail for attacking guards at his facility. Paneque was released in 2017 but remained in the custody of ICE for a month, during which time a judge ordered that he be sent back to Cuba.

The only problem was that, among renewed diplomatic relations with Cuba under the Obama administration, Cuba accepts very few deportations. Last year, they allowed less than 500 people to be returned, despite the fact that more than 37,000 Cuban nationals are facing orders of removal, according to ICE.

Because Cuba refused his return, Paneque was placed under an "order of supervision," and released back into Miami. Before being arrested for the murder of Leandro Lopez, Paneque joked with police officers during questioning about his failed deportation.

MAN ACCUSED OF FATALLY BEATING INFANT OVER PATERNITY HAD BEEN DEPORTED 5 TIMES: ICE

“Where are they going to send me? Cuba doesn’t want me,” Paneque said. “They don’t want me here. They don’t want me there.”

Paneque was arrested on Wednesday and charged with the murder of Leandro Lopez, and police say the motive for the slaying is still unclear.

The entirety of the exchange between what appears to be Paneque and Lopez was caught on a hidden camera in a parking garage after its owner secretly installed the camera after his car was vandalized. In a 5-minute interaction obtained by the Miami Herald, the two men chat for a moment, then Paneque allegedly grabs his gun and hides it for a moment before turning it on Lopez. The victim then begs for his life, and the shooter appears to calm down for a moment -- even appearing to hug Lopez at one point -- but then shoots him several times point-blank.

Paneque admitted that he knew the 31-year-old Lopez through a friend he met in prison, and the two would frequent strip clubs together -- which Paneque told officers they did on the night of Lopez's death. Paneque admitted that the two took his Ford F-150 to several strip clubs together, and admitted that it was him in photos showing the two riding around together.

Paneque told police that he dropped Lopez off at his SUV and didn't see him after that -- before police stunned him by showing him the footage of the cold-blooded murder.

At that point, he invoked his right to remain silent.

ANGEL MOM SPEAKS OUT AFTER ALLEGED ILLEGAL IMMIGRANT KILLER IS DEPORTED TO MEXICO

There have been attempts by Florida politicians to address this issue -- as Paneque not the only dangerous criminal that Cuba refuses to admit back into their country.

Former Miami U.S. Rep. Carlos Curbelo, who introduced an immigration bill last year that failed, said that needs to change.

“This illustrates a major flaw in our immigration laws," he told the Tampa Bay Times. "Even though this individual is an undocumented immigrant with a history of violent crime, by law, he had to be released.

CLICK HERE TO GET THE FOX NEWS APP

“It’s the Cuban government,” Curbelo added. “Bottom line, they have no interest in any kind of cooperation with the United States. They are the problem.”

At home, however, there are things that can be done to help -- a responsibility that falls on the president, according to Juan Carlos Gomez, director of the Carlos A. Costa Immigration & Rights Clinic at Florida International University.

“There are steps the Trump administration could take to prevent the situation from getting worse,” he said.