Get all the latest news on coronavirus and more delivered daily to your inbox.  Sign up here.

A federal judge has denied Tekashi 6ix9ine's request to serve out his prison sentence at home amid the coronavirus pandemic.

Judge Paul Engelmayer denied the request on Wednesday but said that he would have ordered home confinement instead if he had known about the coronavirus when he issued the sentence in December.

LORI LOUGHLIN'S TRIAL STILL SET FOR OCTOBER DESPITE CORONAVIRUS OUTBREAK, JUDGE SAYS

“At the time of sentencing … the Court did not know and could not have known that the final four months of Mr. Hernandez’s sentence would be served at a time of a worldwide pandemic to which persons with asthma, like Mr. Hernandez, have heightened vulnerability,” Englemayer said.

The Brooklyn-based rapper, whose legal name is Daniel Hernandez, pleaded not guilty to racketeering and firearms charges.

The Brooklyn-based rapper, whose legal name is Daniel Hernandez, pleaded not guilty to racketeering and firearms charges. (AP)

Engelmayer said he didn't have the legal authority to change the sentence, which prosecutors pointed out when they opposed the request made by Tekashi 6ix9ine, whose real name is Daniel Hernandez.

But he added that he was issuing “instructive guidance” that the Bureau of Prisons can use if it considers an application by Hernandez, 23, for early release to home confinement.

JEREMY RENNER'S EX-WIFE RESPONDS AFTER HE ASKS THE COURT FOR CHILD SUPPORT REDUCTION AMID CORONAVIRUS SHUTDOWN

“Had the Court known that sentencing Mr. Hernandez to serve the final four months of his term in a federal prison would have exposed him to a heightened health risk, the Court would have directed that these four months be served instead in home confinement,” the judge explained.

A judge has denied rapper Tekashi 6ix9ine's request to serve out his remaining sentence at home amid coronavirus fears. 

A judge has denied rapper Tekashi 6ix9ine's request to serve out his remaining sentence at home amid coronavirus fears.  (Johnny Nunez/WireImage)

In a letter to the judge, Hernandez's attorney, Lance Lazarro, revealed that the rapper was diagnosed with bronchitis and sinusitis in October and was denied a trip to the hospital despite a recommendation from the facility's medical director.

The lawyer said the rapper is serving his sentence in a private jail because he cooperated with prosecutors and because the government has control of him as a cooperator.

Hernandez was arrested in 2018 on racketeering, weapons and drugs charges, but his testimony against members of the Nine Trey Gangsta Bloods gang earned him leniency and his cooperation with prosecutors helped him land a spot in a private prison for his own safety.

CLICK HERE TO GET THE FOX NEWS APP

Hernandez's sentence was reduced from a potential 37 years in prison for crimes that included orchestrating a shooting in which an innocent bystander was wounded.

The Associated Press contributed to this report.