A bizarre custody battle between the children of automotive legend Carroll Shelby and the last of his seven wives has left his body stuck in a Dallas County morgue while a Texas court decides who gets to dispose of his remains.

Shelby, a famed auto designer, has been in the morgue since his death May 10. His children want to cremate him, and his surviving wife has said she wants to decide what happens to his remains.

Adding to the imbroglio is a cryptic comment by Dallas County Medical Examiner Dr. Jeffrey Barnard, who said he was in control of the body “because an allegation was made which falls within” Texas laws pertaining to criminal procedure.

Barnard said the investigation is ongoing and that he could not provide details.

The fight for his body is the latest chapter in what had been a colorful life, and now is turning into an equally colorful legacy for the former race car driver and sports car designer. He died at age 89 at Baylor Hospital in Dallas.

Shelby grew up in east Texas and attended high school in Dallas. He served as a flight instructor at Lackland Air Force Base near San Antonio during World War II. He started auto racing when he was 29 and his rapid successes and unique bib-overalls racing uniform made him a legendary figure before he retired at 37.

After retiring from the race circuit Shelby wanted to build an American sports car that could beat the best European models. He bought some discontinued chassis from the British AC Bristol auto company, had them shipped to Los Angeles and set about building a car that Shelby contended would “blow the Corvettes into the weeds.”

The light European-style chassis melded with a big American V-8 engine eventually became the Shelby Cobras that are now American cult cars.

Shelby’s personal life was as dramatic as his auto career. He changed wives more than some people changed tires.

Shelby married surviving spouse Cleo Shelby in Las Vegas in 1997. But the marriage had problems and Shelby had a divorce petition pending in Texas.

In the court petition for the body, Cleo Shelby, 64, said she has the right to dispose of the body.

But Shelby’s children also are seeking a court order allowing them control of the remains as well as recovery of legal fees to get the body.

Before his death, Shelby left written instructions in an advance directive that his eldest son, Michael Shelby, should arrange for the cremation of the body. In the document filed with the court and signed and notarized Feb. 8, Shelby said that he wanted his ashes “divided equally among and given to each of my then living children and one additional equal share to be buried in my parents’ family plot in Leesburg, Texas.”

A 2008 document also empowers Michael Shelby to make funeral arrangements.

Cleo Shelby alleged the Feb. 8 document was “forged” because by that date Shelby lacked the ability to sign a document. Moreover, she said that following an August 2010 stroke Carroll Shelby executed a healthcare power of attorney assigning her as the primary health decision maker and that named Michael Shelby as alternate healthcare agent. A clause in the form, known as the Wisconsin Health Care Power of Attorney, states that “the signing of this document by the principal revokes all previous power of attorney for healthcare documents.”

Cleo Shelby also argued that on Feb. 14, Michael Shelby secretly spirited his father out of UCLA Medical Center to Dallas. She arrived to visit Shelby only to find “an empty room” and feared that he had died. She said Michael Shelby then limited her contact with his father.

Michael Shelby discounted the forgery allegations, noting that the funeral instructions he received were witnessed by four people and a notary. He also said he is not trying to shut Cleo Shelby out of a funeral for Carroll Shelby.

“We are trying to honor Carroll Shelby’s wishes,” he said. “This is not a case of what the kids want versus what the wife wants.”

Carroll Shelby may be in the morgue as an outcome of his own request. Michael Shelby said the former race car driver requested his own autopsy. Now that there’s a fight over his body, Dallas County won’t release the remains until it has the final report and direction from the court on who gets his remains.

What happens next isn’t clear. Attorneys for both sides would not talk about the case, and the court has not scheduled a hearing to decide the matter. Barnard did not indicate when his investigation might wrap up.

In the meantime, Carroll Shelby is wrapped in a body bag, preserved in a cooler with a temperature of 36 degrees.

jerry.hirsch@latimes.com