A Westchester County doctor ignored an ailing Alzheimer’s patient’s last wishes by callously prolonging his painful final days, a new lawsuit charges.

“There are times when Gerry was crying. He was not a man who cried, but he was suffering,” Elaine Greenberg told The Post of her retired periodontist husband, Dr. Gerald Greenberg, 63.

Gerald had been diagnosed with early-onset Alzheimer’s in 2010, and by 2016 couldn’t recognize or communicate with his wife and two sons, according to the family’s Bronx Supreme Court lawsuit.

But before being completely incapacitated, the Roslyn, LI, man wrote in a 2011 living will that he was to be given “comfort measures only, no intravenous fluids and no antibiotics,’’ if his condition became incurable, the suit says.

Yet Dr. Diego Escobar of Montefiore New Rochelle Hospital “deliberately violated Dr. Greenberg’s living will” by giving him medications that kept him alive for a painful month during a stay there in 2016, court documents allege.

Gerald had landed in the hospital on Nov. 3 of that year after being found lying on the floor of his nursing-home room for more than a day.

His son Michael gave the hospital staff a copy of Gerald’s living will, while a doctor other than Escobar told Michael and Elaine that the patient “may have life-threatening sepsis,” court papers state.

The family decided that since Gerald’s condition “meant that he would never be able to regain any type of normal mental or physical function,” they would honor his wishes and let him pass as quickly as possible, according to the lawsuit.

Elaine’s lawyer, Gerry Grunsfeld, told The Post that Gerald would likely have succumbed within four days without medical intervention.

The family informed another doctor at the hospital of their decision, but the next day, “in direct contradiction to the notes in the medical records,’’ Escobar ordered that Gerald be given antibiotics intravenously for three days, the suit claims.

Escobar then allegedly ordered other tests and treatments as well. Elaine told The Post that she asked to speak to the physician to protest but was given the runaround trying to reach him.

“I don’t know if the doctor just wanted to force his own beliefs on Gerry and disobey his wishes,” Elaine said. “I don’t know if they wanted to treat him like a cash cow doing tests and then billing insurance. There is no logical reason to go against [his living will].”

Gerald lingered for weeks as the hospital allowed him “to endure the pain and discomfort of dying from a lack of hydration/nutrition,’’ the suit claims.

He was moved from Montefiore to a hospice facility on Dec. 2, 2016, and died Dec. 5.

The suit targets Escobar, Montefiore New Rochelle Hospital and its parent company, Montefiore Health Systems, Inc.

Montefiore officials did not return requests for comment. Escobar did not respond to messages left for him at the hospital.