An Upstate New York police sergeant overdosed on a legal, but controversial recreational drug which caused his death last month, officials revealed on Tuesday.

Sgt. Matthew Dana, 27, died August 6 at his home after overdosing on kratom, the Franklin County Coroner Shawn Stuart ruled. Stuart said Dana did not intend to overdose, and ruled the Tupper Lake Police Sergeant's death as accidental, according to the Adirondack Daily Enterprise.

BREAKING: Coroner says kratom overdose killed Tupper Lake police Sgt. Matt Dana https://t.co/PRpeJIvRuq pic.twitter.com/0rkrDP04wH — Adk Daily Enterprise (@AdkEnterprise) September 12, 2017

"He was at his home where he had been living with his girlfriend, and he just dropped dead," Village Mayor Paul Maroun told the Plattsburg Press Republican in August.

The official cause of death was a hemorrhagic pulmonary edema, or blood in the lungs, as a result of overdosing on mitragrynine, which is the active ingredient in kratom.

Kratom is a plant that has been used both recreationally and in traditional medicine to relieve pain. It has also been used to prevent withdrawal from opiates.

Kratom is legal in the United States, but banned in several other countries. The DEA announced plans to make kratom a Schedule 1 illegal drug, but has not followed through.

Dana had been a sergeant for less than a year, but Maroun said that he had shown himself to be fine officer and representative of the Tupper Lake community in that time.