A 900-pound Virginia man pleaded guilty in a cocaine conspiracy case from inside an ambulance during a hearing the loading dock of a federal courthouse on Tuesday.

Kenneth Hicks, 48, from Emporia, pleaded guilty from a stretcher inside an ambulance that had been backed up to the loading zone of the U.S. Courthouse in downtown Richmond, the Richmond Times-Dispatch reported.

During the hearing, Magistrate Judge David Novak noted how the court had gone through "some extraordinary procedures" to deal with Hicks' health issues and to "protect his dignity."

JURY DELIBERATES IN VERMONT WRONG-WAY CRASH THAT KILLED 5

Previously, Novak had approved an unusual plan to get Hicks to the courthouse in a way that protected his health, safety and dignity. The elaborate plan involved the possibility of cutting a hole in the wall of Hicks’ residence in order to lift him out.

“The FBI and U.S. Marshals may determine that it is necessary to open a large hole in the wall of the structure in order to facilitate the use of a device capable of lifting the defendant’s weight,” the request, which was approved by the judge, said.

“This procedure may also require the removal of the ramp near his doorway, and trees on the property. This procedure may require the bracing of the floor, and the removal of parts of the ceiling structure as well,” the request continued. “All steps will be taken to minimize damage and protect the defendant’s property.”

135 OFFICERS ARREST 50 PEOPLE IN MASSIVE CONNECTICUT HEROIN BUST: 11 SUSPECTS ON THE RUN

Hicks -- who reportedly cannot dress himself or walk -- was supposed to appear in court last week, but after he was removed from his home he had to be brought to a hospital. He told the court he was being treated for injuries on his back and was receiving insulin.

During the hearing, his lawyer was in the ambulance with him, the Times-Dispatch reported, while Magistrate Judge David Novak and a prosecutor sat at a table on the loading dock.

Hicks pleaded guilty to a charge of conspiracy to distribute and possess with the intent to distribute, which took place from 2013 to 2017. The conspiracy involved 18 people, according to the Times-Dispatch, who have been charged in three indictments.

CLICK HERE FOR THE FOX NEWS APP

Hicks faces a minimum of five years up to a maximum of 40 years and a $5 million fine, the outlet reported. Novak scheduled Hicks’ sentencing hearing for September.

The Associated Press contributed to this report.