ELLSWORTH, Maine — A judge will decide whether a veterinarian bilked an elderly veteran out of half of his Trenton property or if she simply paid less than the market price rather than accept it as a gift.

Dr. Kathleen Prunier is accused of taking advantage of Richard Royal, who suffered from dementia before he died last month, when she bought the property on Southwest Point from him in July 2014 for thousands less than it was appraised for. She has pleaded not guilty to theft by unauthorized taking, a Class B crime.

Royal sold 5.27 acres of his 10-acre parcel to Prunier for $4,000, Assistant Attorney General Leanne Robbin, who is prosecuting the case, said Wednesday in her opening arguments of the jury-waived trial at the Hancock County Courthouse. Jennifer Mott, an appraiser based in Otis, testified that the property was worth $39,000 at the time of the sale.

Prunier, a neighbor of Royal’s who operates Your Pet’s Next Best Friend veterinary clinic in Bar Harbor, made no down payment but agreed to pay $45.38 per month with no interest toward the cost of the property, the prosecutor said. Prunier, 59, also obtained a walking right of way to the ocean across Royal’s land but the purchase did not include any oceanfront property.

“He had dementia and his niece was managing his finances,” the prosecutor said in her opening statement. “It was like taking candy from a baby.”

But defense attorney Dawn Corbett of Ellsworth said Royal wanted to give her client the land, but she refused.

Instead, Prunier went to the Trenton Town Office to determine the assessed value of the land because she thought she should pay Royal “something for the property,” Corbett said. The contract for the sale included a provision that Prunier pay $760 per year for five years — a total of $3,800 — toward Royal’s property taxes on the five acres he retained.

“She was his friend,” Corbett said of Prunier’s relationship with Royal. “She visited him twice a week.”

If convicted, Prunier faces up to 10 years in prison and a fine of up to $20,000. She also could be ordered to return the land to Royal’s estate.

Royal died July 11 at the age of 85. He was a veteran of the U.S. Navy and retired from the Maine Department of Transportation, according to his obituary. His wife of 44 years, Betty Royal, who worked at a local bank, died in October 2012 at the age of 83.

Prunier came to the attention of the Maine attorney general’s office when it began investigating Lisa Harriman, 55, of Mariaville, Seth Blodgett, a detective with the office, testified Wednesday. Harriman was Richard Royal’s caregiver after his wife’s death.

Harriman has pleaded not guilty to one count each of theft by unauthorized taking and misuse of entrusted property. She allegedly stole more than $200,000 from Royal by convincing him to cash in a $150,000 life insurance policy, minus a $37,000 penalty, and writing herself a $100,000 check from the victim’s bank account.

Harriman has opted for a jury trial but it has not yet been scheduled.

Prunier’s trial is expected to conclude Thursday after the defense presents its case. The state rested its case Wednesday afternoon. Roberts is expected to issue a written verdict at a later date.