By TERI FIGUEROA JUNE 29, 2017 5:30 PM

VISTA —  The author of the popular pH Miracle book series will spend the next five months in jail, after admitting that he illegally treated patients at his luxury Valley Center ranch without any medical or scientific training.

Robert O. Young was taken into custody in a Vista courtroom Thursday morning. He had been convicted last year on two counts of practicing medicine without a license and pleaded guilty earlier this year to two additional felony counts.

The 65-year-old Young didn’t speak during the hearing, which marked the end of a three-year criminal case that highlighted his controversial theories and the pricey treatments he offered to seriously ill or dying patients, who in some cases were given intravenous fluids mixed with baking soda at $500 a pop.

He’s the author of several books including the bestselling “The pH Miracle: Balance Your Diet, Reclaim Your Health,” which was first published in 2002 and later translated into more than 18 languages. His work, and treatments at the ranch, were based on the theory that acidity in the body is the cause of disease, and that an alkaline diet is the answer.