An LPGA golfer lost a tournament over the weekend in an extremely painful and surprising way.

With six holes to go in the ANA Inspiration, the first major of the LPGA season, Lexi Thompson had a three-stroke lead on the field.

As she walked off the 12th green, Thompson was approached by LPGA rules officials.

She was promptly handed a four-stroke penalty for an incident that occurred a day earlier during the third round of the tournament.

Rory McIlroy Slammed by Fans, Media for Golfing with Pres. Trump

Climate Change Protesters Carve Message on Trump Golf Course Green

The infraction, brought to the attention of LPGA officials in an email by a television viewer, happened on the 17th hole Saturday.

Video shows Thompson replace her ball an inch away from its original position on a one-foot putt.

It was deemed a violation and Thompson was retroactively docked two strokes plus an additional two for returning an incorrect scorecard.

The penalty immediately turned Thompson's three-stroke lead into a one-stroke deficit.

When Thompson was informed of the penalties, she responded, "Is this a joke?"

It was not, and a gutsy Thompson finished the round with a bogey and three birdies to force a sudden death playoff with So Yeon Ryu.

Unfortunately for Thompson, she missed the fairway off the tee on the first playoff hole. Ryu held the upper hand and claimed her win with a birdie.

WATCH: Really Brave PGA Golfer Smacks Gator to Get It Off the Course

Golfer's Shot from Edge of Water Hazard Is a Hilarious Disaster

The LPGA released a statement about the controversial incident:

On Sunday afternoon, the LPGA received an email from a television viewer, saying that Lexi Thompson did not properly replace her ball prior to putting out on the 17th hole during Saturday's third round of the ANA Inspiration. The claim was quickly investigated by LPGA Rules officials.

After a full review, it was determined that Thompson breached Rule 20-7c (Playing From Wrong Place), and received a two-stroke penalty under Rule 16-1b. She incurred an additional two-stroke penalty under Rule 6-6d for returning an incorrect scorecard in round three. She was immediately notified of the breach by LPGA Rules Committee in between holes 12 and 13 of the final round.

After her runner-up finish, Thompson gave an emotional interview to the Golf Channel, saying that she made an honest mistake and she will learn from it.

Spicer Pressed on Why Trump's Golf Trips Are Different Than Obama's

Report: 9 in 10 Pro Golfers Say They'd Play With Trump Despite Potential Backlash

See What Happens When Pro Golfers Challenge Heckling Fan to Sink Putt for $100