Updated

A screaming, weeping Paris Hilton was back in the slammer Friday after a judge ordered her to go back to prison to serve out the remainder of her 45-day sentence for a probation violation in a reckless driving case.

Leaving the courthouse, Hilton shouted "It's not right!"

"Mom!" she called out to her mother in the audience.

Photo Essay: Paris Ordered Back to Court

The heiress will get credit for the five days she already served. Hilton's lawyers were going to appeal her sentence later Friday or Monday, TMZ.com reported.

Hilton, 26, arrived in court Friday afternoon, sneaking past the media for the hearing that determined she would be sent back to be jail. The sheriff's department that released her from prison picked her up at her home under judge's orders.

Sheriff Lee Baca, who had released her, said later at a press conference that he was concerned because of a serious medical condition he could not disclose, though his further comments suggested psychological problems.

Baca said he would now keep her in a "better facility, one that has a more intense form of medical support and will watch her behavior so that there isn't anything that is harmfully done to herself by herself."

He said he had learned from one of her doctors that she was not taking a certain medication while she was in custody previously and her "inexplicable deterioration" puzzled county psychiatrists.

Baca also charged that Hilton received a more severe sentence than warranted, but he would not try to overrule the judge's decision again.

"The criminal justice system should not create a football out of Ms. Hilton's status," the sheriff said grimly.

The reality star came into the courtroom disheveled and weeping. Her hair was askew and she wore a gray fuzzy sweatshirt over slacks. She wore no makeup and she cried throughout the hearing.

Her body also shook constantly as she dabbed at her eyes. Several times she turned to her parents, seated behind her in the courtroom, and mouthed, "I love you."

Despite being ordered to serve the remainder of her original 45-day sentence, Hilton could still be released early. Inmates are given a day off their terms for every four days of good behavior, and her days in home detention counted as time served.

Superior Court Judge Michael T. Sauer was calm but apparently irked by Baca's decision to release Hilton three days into her sentence due to an unspecified "medical condition."

"I at no time condoned the actions of the sheriff and at no time told him I approved the actions," Sauer said. "At no time did I approve the defendant being released from custody to her home."

The hearing was requested by the city attorney's office, which had prosecuted Hilton and wanted Baca held in contempt for releasing Hilton despite Sauer's expressed order that she must serve her time in jail. The judge took no action on the contempt request.

A member of the county counsel's staff said Baca was willing to come to court with medical personnel. The judge did not take him up on the offer.

Assistant City Attorney Dan F. Jeffries argued that Hilton's incarceration was purely up to the judge. "Her release after only three days erodes confidence in the judicial system," he said.

Hilton's attorney, Richard Hutton, implored the judge to order a hearing in his chambers to hear testimony about Hilton's medical condition before making a decision. The judge did not respond to that suggestion.

Another of her attorneys, Steve Levine, said, "The sheriff has determined that because of her medical situation, (jail) is a dangerous place for her."

"The court's role here is to let the Sheriff's Department run the jail," he said.

The judge interrupted several times to say that he had received a call last Wednesday from an undersheriff informing him that Hilton had a medical condition and that he would submit papers to the judge to consider. He said the papers never arrived.

Every few minutes, the judge would interrupt proceedings, state the time on the clock, and note that the papers still had not arrived.

He also noted that he had heard that a private psychiatrist visited Hilton in jail, and he wondered if that person played a role in deciding her medical needs.

The last attorney to speak was another deputy city attorney, David Bozanich, who declared, "This is a simple case. There was a court. The Sheriff's Department chose to violate that order. There is no ambiguity."

Hilton's twisted jailhouse saga began Sept. 7, when she failed a sobriety test after police saw her weaving down a street in her Mercedes-Benz on what she said was a late-night hamburger run.

She pleaded no contest to reckless driving and was sentenced to 36 months' probation, alcohol education and $1,500 in fines. In the months that followed she was stopped twice while driving on a suspended license. The second stop landed her in Sauer's courtroom.

Back before Sauer on Friday, Hilton's entire body trembled as the final pitch was made for her further incarceration. She clutched a ball of tissue and tears ran down her face.

Seconds later, the judge announced his decision: "The defendant is remanded to county jail to serve the remainder of her 45-day sentence. This order is forthwith."

Hilton screamed.

Eight deputies immediately ordered all spectators out of the courtroom. Hilton's mother, Kathy, threw her arms around her husband, Rick, and sobbed uncontrollably.

Deputies escorted Hilton out of the room, holding each of her arms as she looked back.

The Associated Press contributed to this report.

Click here for FOXNews.com's Paris Hilton center.

FOX Facts: Other celebrities who've served shorter punishments

When is the doctor's note a get-out-of-jail-free card?

Speakout: What do you think of Paris' prison break?

Speakout: Write your own Paris headline