FIRST ON FOX: A Texas doctor dubbed a "medical terrorist" after he was allegedly caught tampering with IV bags says he deserves bail because he shot his neighbor's dog for barking incessantly, not in retaliation for her helping his ex-girlfriend leave him.

Dr. Raynaldo Rivera Ortiz Jr., 59, has been held without bond since his arrest last September on charges he injected heart-stopping poison into IV bags at his former medical clinic that led to the death of fellow doctor Melanie Kaspar and caused cardiac emergencies in 11 other patients.

Federal prosecutors say the anesthesiologist committed the shocking crimes at Baylor Scott and White Surgicare North Dallas in retaliation for a medical misconduct probe. 

A judge ordered Ortiz's detention after prosecutors argued that he's a danger to the community by citing, in part, a 2015 incident in which he shot his neighbor's dog in retaliation for the woman helping his then-girlfriend obtain a restraining order against him after a domestic violence incident.

DALLAS DOCTOR DUBBED ‘MEDICAL TERRORIST’ AFTER CAUGHT TAMPERING WITH IV BAGS

Dr. Raynaldo Ortiz shown placing IV bags in warmer.

Dr. Raynaldo Rivera Ortiz Jr., left, and a screenshot from surveillance footage where he's allegedly tampering with IV bags that poisoned patients. (WebMD/U.S. State Attorney's Office)

In the latest motion for bail, Ortiz's defense lawyer offered another possible motive for the shooting: "a longstanding frustration with the dog's noise."

A witness testified at the 2015 animal cruelty trial that Ortiz, annoyed by the constant barking, had threatened to shoot the neighbor's dog "hundreds of times," court records show.

Since the shooting wasn't in retaliation for helping his ex, and the crime "did not involve a human victim," the government hadn't proven that Ortiz is a threat to public safety, the defense argued.

In addition, the poisoning case against Ortiz is weak, the defense added.

Raynaldo Ortiz Jr.s booking photo beside Dr. Melanie Kaspar

Dr. Raynaldo Rivera Ortiz was arrested in connection with the contamination of IV bags, which allegedly caused the death of Dr. Melanie Kaspar. (Dallas Police Department/Obituary)

"At most, the government has produced evidence of suspicious coincidences," wrote assistant federal public defender John Nicholson. "The weight of the evidence does not demand detention."

Prosecutor John de la Garza countered in a reply motion that the evidence against Ortiz is overwhelming and that "shooting a person's pet obviously victimizes the owner of the injured animal."

TEXAS DOCTOR ARRESTED IN CONNECTION TO CONTAMINATED IV BAGS THAT KILLED PHYSICIAN

Ortiz was sentenced in 2016 to 29 days in jail in for firing a pellet gun into the dog's chest. 

De la Garza dismissed the defense's attempt to downplay the evidence in the poisoning case as disingenuous. 

Dr. Raynaldo Rivera Ortiz Jr. worked at Baylor Surgicare in North Dallas

The hospital where Dr. Raynaldo Rivera Ortiz Jr. is accused of tampering with IV bags that led to the death of another physician and sickened at least one patient. (Google Maps)

"Ortiz was caught red-handed on video" placing contaminated IV bags in the facility's warmers minutes before patients experienced severe medical emergencies, the motion says.

Ortiz is an "extraordinary danger to the public" with a troubled personal and professional history whose scheme "evidences remarkably depraved criminal creativity," de la Garza wrote.

CLICK HERE TO GET THE FOX NEWS APP

Chief District Judge David Godbey denied Ortiz's motion for release and set a trial date of Sept. 11 in U.S. District Court for the Northern District of Texas.

Ortiz is charged with five counts each of tampering with a consumer product and adulteration of a drug. If convicted, he faces up to life in prison or even the death penalty.