Unfortunately, it was not a fairy tale ending for these three bears.

Three members of a grizzly bear family grazing by train tracks near Glacier National Park in Montana were killed when they were struck by trains in two incidents that occurred just hours apart earlier this month, officials said.

Montana Fish, Wildlife, and Parks said in a news release on Monday the first freight train hit the 232-pound mother grizzly around 4:19 a.m. on June 6 approximately two miles east of Marias Pass near Glacier National Park.

"The adult female was previously captured in 2000 as part of a Glacier National Park research project," the agency said.

MONTANA HUNTERS WHO ILLEGALLY KILLED YELLOWSTONE MOUNTAIN LION LEFT TRAIL OF PHOTOS ON SOCIAL MEDIA

Later that same day, the mother bear's two male yearlings were also struck and killed -- in the same spot -- by another freight train. Each of the young bears weighed 65 pounds, according to officials.

A mother grizzly bear and her two cubs were struck and killed by freight trains in two separate incidents earlier this month, according to officials. (iStock)

Fish and Wildlife officials investigated both incidents and determined there were "no attractants present" that would have drawn the three bears to the tracks.

Conflicts between trains and bears have been problematic in the region.  A series of derailments in the 1980s and 1990s spilled grain along the right-of-way that attracted bears, according to the Flathead Beacon.

Last year, trains in West Glacier and Columbia Falls struck and killed two males, the paper reported.

MONTANA MEN WHO KILLED MOUNTAIN LION AT YELLOWSTONE SENTENCED TO 3-YEAR WORLDWIDE HUNTING BAN

"FWP has worked with agencies and railroad companies over the years to minimize grizzly bear mortalities along travel routes," the Montana agency said Monday. "These preventative measures include reducing attractants."

The trains struck and killed the three bears two miles east of arias Pass near Glacier National Park on June 6. (iStock)

Montana officials said that U.S. Fish and Wildlife Service was notified of the incidents.

CLICK HERE FOR THE FOX NEWS APP

The region, known as the Northern Continental Divide Ecosystem, is home to more than 1,000 grizzly bears and spans Glacier National Park, parts of the Flathead and Blackfeet Indian Reservations, in addition to parts of five national forests, state, and private lands.