Los Angeles (CNN) -- The end is coming for radio and TV icon Casey Kasem.
He's suffering from dementia and bedsores, and his body is shutting down at a hospital in Washington state, court documents say.
On Wednesday, a Los Angeles County judge gave daughter Kerri Kasem the authority to have doctors end his infusions of water, food and medicine.
The ruling reinstates the 82-year-old's end-of-life health directive.
Kasem's doctor concluded that continuing the artificial nutrition and hydration would only "at best prolong the dying process for him and will certainly add suffering to an already terribly uncomfortable dying process," said Kerri Kasem's lawyer, Troy Martin.
"The court's decision today upheld our father's explicit wishes as expressed by him in his health directive," Kerri Kasem said in a statement after the hearing. She was referring to a directive her father signed in 2007, saying he would not want to be kept alive if it "would result in a mere biological existence, devoid of cognitive function, with no reasonable hope for normal functioning."
Steve Haney, an attorney for Kasem's second wife, Jean, slammed the judge's decision, calling it "the functional equivalent of a death sentence."
"Nobody wants Mr. Kasem to die," Martin said. "The fact is that he is dying from sepsis and dementia."
Now that Kerri Kasem can order doctors to withhold water, food and medicine from her father, will she?
She has before.
Over the weekend, infusions were stopped, but they were reinstated Monday after a request by Jean Kasem and under the order of Judge Daniel Murphy -- the same judge who reversed himself and restored the authority to Kerri Kasem on Wednesday.
The family has made no announcement about his care.
The public battle over Casey Kasem -- which has always been emotional and sometimes bizarre -- began in October 2013, when daughters Julie and Kerri led a protest outside Kasem's Los Angeles mansion, holding signs demanding that their stepmother let them see their ailing father.
Kerri Kasem told reporters that Jean Kasem had kept them away for the previous three months and that she was worried about her father's health.
"I don't get it, I don't understand it," she told CNN. "He has Parkinson's, and all the research we've done indicates socialization would help him."
About a dozen people who said they were friends of Kasem joined the daughters in the sign-waving demonstration at the entrance to the Kasem estate. "Let Casey see his kids," one sign read. His younger brother, Mouner Kasem, flew to Los Angeles from Michigan to hold a sign that read: "I miss my brother."
"He can't really speak, but he knows we're there," Kerri Kasem told a TV reporter covering the protest. "And last time we saw him, he could shuffle a little bit. He had a hard, very hard, time walking. He was just deteriorating due to Parkinson's disease."
Daughter Julie Kasem and her husband, a cardiologist, filed a petition in court days later asking a judge to give them control of Kasem's medical care. Los Angeles County Superior Judge Lesley Green appointed an investigator to report on Kasem's condition. The judge ruled in November that he was being well cared for by his wife and denied the daughter's request for a medical conservatorship.
But that changed recently.
Murphy temporarily expanded Kerri Kasem's powers over her ailing father at a May 24 hearing. The judge also said that the famed radio countdown host "cannot travel anywhere without a court order and until the doctor examines him and gives him clearance for a journey," a court spokeswoman said.
Earlier in the month, Jean Kasem moved her husband to Washington state from Southern California without notifying the rest of the family.
Jean Kasem again faced off with her stepchildren in a Kitsap County court on May 30, a hearing that ended with Kerri Kasem getting a judge's approval to visit her father for an hour. The judge also gave Kerri Kasem authority to take him to a doctor.
Reaching for the stars
The dispute is about love, Kerri and Julie Kasem said. Jean, his wife of 33 years, argued it's about Kasem's fortune, built over four decades of radio and television voice work.
Kasem's voice counted down the "American Top 40" hits each week for nearly four decades in a radio show heard around the world. He voiced the cartoon character Shaggy on "Scooby-Doo" cartoons for 40 years. He was the voice of the NBC television network for years. He narrated thousands of radio and television commercials during his career.
He divorced his first wife when his daughters and son were young. He was remarried in 1980 to Jean, a 26-year-old actress best known for a recurring role on TV's "Cheers" series. The couple have a daughter together, Liberty Kasem, now a 24-year-old aspiring singer.
Kasem became the world's best-known radio host as his syndicated shows grew in popularity and distribution through the 1970s and 1980s. His famous signoff was "Keep your feet on the ground and keep reaching for the stars." He finally handed off his duties to Ryan Seacrest in 2004.
He retired from hosting and voice work in 2009, two years after a doctor diagnosed him with Parkinson's disease, a diagnosis that was later changed to Lewy body dementia, which has no cure, according to court documents.
Planning for the end
After Kasem was told he had Parkinson's in 2007, he signed a document giving his oldest children authority to make his medical decisions if he should become unable to do so himself.
The power of attorney statement signed by Kasem on November 11, 2007, included a declaration that he did not want to be kept alive with "any form of life sustaining procedures, including nutrition and hydration" if it "would result in a mere biological existence, devoid of cognitive function, with no reasonable hope of normal functioning."
This document, which snubbed Kasem's wife, set the stage for the legal battle that would erupt six years later as his health deteriorated and his children accused their stepmother of shutting them out of their father's life. It would serve as a legal basis for his daughter to have doctors discontinue infusions of water, food and medicine.
Preparing to say goodbye
All of Kasem's children, his brother and his wife gathered at St. Anthony's Hospital on Friday, preparing to say goodbye. Kasem "won't be with us much longer," said Danny Deraney, the rep for Kerri Kasem.
Despite their bitter squabble, Kerri Kasem said the children from his first marriage wanted their stepmother and half-sister to be with them as it seemed his last moments were nearing.
"If he opens his eyes, I want my dad just once to see everyone standing around him, putting our differences aside and let him know how much he is loved by everyone, including Jean and Liberty," she said.
"For the last 11 days, our father has been surrounded day and night by love and care by his daughters Kerri and Julie, his son Mike, his brother Mouner and sister-in-law Mary, and his dear friend Gonzalo Venecia," Kerri's rep said in a statement to CNN Wednesday. "We continue to hope that Jean and Liberty will come join his family during this time."
CNN's Jane Caffrey, Matthew Carey and Rachel Wells contributed to this report.