Three hunters in Montana who illegally killed a mountain lion in Yellowstone National Park last year were caught after authorities followed a trail of pictures the trio posted on social media, according to court documents.

Austin Peterson, 20, Trey Juhnke, 20, and Corbin Simmons, 19, were sentenced last month to a three-year worldwide hunting ban after other hunters alerted game wardens to photos of the illegal kill that had been shared to Instagram, Snapchat and Facebook, according to investigation documents obtained by the Jackson Hole News & Guide.

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

“You know, we ended up getting a lot of this information from a guy in Bozeman off of Facebook because you guys put a bunch of stuff on social media,” Yellowstone special agent Jake Olson told Simmons during an interview, per the documents.

Each of the men had previously admitted to shooting the mountain lion in a clearly marked area of the park on Dec. 12, 2018, before taking it back to their vehicle across the border. The documents claimed they later changed their story when authorities interviewed them separately.

HUNTER WHOSE GIRAFFE PHOTO WENT VIRAL SAYS SHE'S 'ABSOLUTELY' STILL HUNTING: 'I AM PROUD OF THAT GIRAFFE'

The three men contradicted details in each other’s accounts, including when they saw boundary posts, the color of Peterson’s GPS screen when it supposedly malfunctioned and who shot at the lion, the News & Guide reported.

Authorities learned that all three men had fired at the mature male lion, which was shot eight times, and killed it after it crossed the border into Yellowstone, according to the documents.

CLICK HERE TO GET THE FOX NEWS APP

The men’s actions were found to be in violation of the Lacey Act of 1894, per the National Park Service (NPS), which prohibits the taking, selling or purchasing of wildlife from protected areas.

Peterson, Junke and Simmons all pleaded guilty and were ordered to pay $1,666 each in restitution, along with three-year unsupervised probations, which included the worldwide hunting ban, according to the documents.

Fox News’ Michael Bartiromo contributed to this report.