Actor Pierce Brosnan, who pleaded guilty to stepping off a trail in a thermal area during a visit to Yellowstone National Park, got caught after posting pictures online, court records show.

Brosnan, whose fictitious movie character James Bond has been in hot water plenty of times, was fined 500 dollars (£392) and ordered to make a donation of 1,000 dollars (£784) to Yellowstone Forever — a non-profit organisation that supports the park — by April 1, court records said.

Prosecutors had recommended a fine of 5,000 dollars (£3,921) and a two-year probationary sentence.

A second petty offence, for violating closures and use limits, was dismissed by US Magistrate Judge Stephanie Hambrick.

Black Adam
The actor was ordered to pay a 1,500 dollar fine (Yui Mok/PA)

Brosnan’s attorney, Karl Knuchel, did not immediately respond to requests for comment.

In a post on his Instagram page, Brosnan said that he made an “impulsive mistake”.

He wrote: “I deeply regret my transgression and offer my heartfelt apologies to all for trespassing in this sensitive area.

“Yellowstone and all our National Parks are to be cared for and preserved for all to enjoy.”

Brosnan, 70, walked in an off-limits area at Mammoth Terraces, in the northern part of Yellowstone near the Wyoming-Montana line, on November 1, according to the citations.

He was in the park on a personal visit and not for film work, the US Attorney’s Office for Wyoming has said.

However, he uploaded images of himself standing in the snow on the thermal feature to his Instagram page, court records said.

Mammoth Terraces is a scenic spot of mineral-encrusted hot springs bubbling from a hillside.

They are just some of the park’s hundreds of thermal features, which range from spouting geysers to gurgling mud pots, with water at or near the boiling point.

Going out-of-bounds in such areas can be dangerous. Some of the millions of people who visit Yellowstone each year get badly burned by ignoring warnings not to stray off the trail.

Getting caught can bring legal peril, too, with jail time, hefty fines and bans from the park handed down to trespassers regularly.

In addition to his four James Bond films, Brosnan starred in the 1980s TV series Remington Steele and is known for starring roles in the films Mrs Doubtfire and The Thomas Crown Affair.