A federal judge in Delaware on Wednesday ordered Hunter Biden to "actively seek employment," abstain from drugs or alcohol, submit to random drug testing and not possess a firearm as conditions for staying out of jail. 

The conditions were laid out by U.S. District Court Judge Maryellen Noreika as part of the ongoing investigation in Delaware centering around the first son. 

HUNTER BIDEN'S ‘SUGAR BROTHER’ SPOTTED SMOKING BONG ON HOME BALCONY DURING VISIT FROM PRESIDENT'S SON

Hunter Biden

Hunter Biden, right, leaves the J. Caleb Boggs Federal Building in Wilmington, Delaware, on Wednesday. (RYAN COLLERD/AFP via Getty Images)

Hunter Biden was charged last month with two misdemeanor crimes of failure to pay more than $100,000 in taxes from over $1.5 million in income in both 2017 and 2018. 

The younger Biden had been expected to plead guilty Wednesday after he made an agreement with prosecutors who were planning to recommend two years of probation. 

THE FAILED HUNTER BIDEN PLEA DEAL IS A PROBLEM OF THE DOJ'S MAKING: JONATHAN TURLEY

But the plea deal collapsed during a court hearing after Judge Noreika raised concerns about the terms of the agreement and her role in the proceedings.

The plan also included an agreement on a separate gun charge — Hunter Biden has been accused of possessing a firearm in 2018 as a drug user. The younger Biden has admitted to struggling with drug addiction in the past. 

As long as he adhered to the terms of his agreement, the gun case was to be wiped from his record. Otherwise, the felony charge carries 10 years in prison.

The overlapping agreements created confusion for the judge, who said the lawyers needed to untangle technical issues — including over her role in enforcing the gun agreement — before moving forward.

Prosecutors said Wednesday that Hunter Biden remains under active investigation, but would not reveal details. In the meantime, he pleaded not guilty to the tax charges.

WHITE HOUSE SHUTS DOWN QUESTIONS ON COLLAPSE OF HUNTER BIDEN PLEA DEAL: ‘I DON’T HAVE ANYTHING TO SHARE'

The collapsed proceedings were a surprising development in the yearslong investigation and a resolution that had been carefully negotiated over several weeks and included a lengthy back-and-forth between Justice Department prosecutors and Hunter Biden's attorneys.

J Caleb Boggs Federal Building in Delaware

Police officers enter the J. Caleb Boggs Federal Building in Wilmington, Delaware, on Wednesday. (RYAN COLLERD/AFP via Getty Images)

The plea deal was meant to clear the air for Hunter Biden and avert a trial. Republicans, meanwhile, are insisting he got a sweetheart deal in which the Democratic president's son got off easy while the president's rival, former President Donald Trump, has been unfairly castigated.

CLICK HERE TO GET THE FOX NEWS APP

"District Judge Noreika did the right thing by refusing to rubberstamp Hunter Biden's sweetheart plea deal," said House Oversight Committee chairman Rep. James Comer, R-Ky. "But let's be clear: Hunter's sweetheart plea deal belongs in the trash."

Fox News Digital has reached out to Hunter Biden’s legal team for comment. 

The Associated Press contributed to this report.