The final round of the ANA Inspiration took a dramatic turn midway through as leader Lexi Thompson was handed a four-shot penalty for a rule break in her third round.

Thompson was two shots clear on 17 under having just bogeyed the 12th hole when she got the news from tournament officials that she was being punished for incorrectly replacing a marked ball on the 17th green on Saturday.

It emerged that a television viewer spotted the offence and informed LPGA officials, who reviewed the footage and sanctioned the American mid-round.

Thompson appeared to put the marker at the side of her ball, which was then replaced in front of the marker.

The American was visibly moved to tears as she was told the news, asking the official: "Is this a joke?"

The penalty saw her drop to two shots off new leader Suzann Pettersen, but she responded in style by immediately grabbing the share of the lead back as she birdied the 13th, with Pettersen bogeying.

So Yeon Ryu and Minjee Lee also benefited from Thompson's punishment as they also sit on 13 under going into the closing stages of their rounds.

She steeled herself in superb fashion, though, and, after fighting back with an immediate birdie at the 13th, had an eagle putt on the last hole to claim what would have been an amazing win.

However, she could only birdie it, to tie on 14 under with Ryu and force a play-off, which the South Korean won at the first attempt with a birdie on the 18th.

A tearful Thompson, who received vociferous support on the course after the incident, said on the Golf Channel: "It is unfortunate with what happened, I did not mean that at all, I had no idea that I did it.

"I had to regroup myself, my caddie helped me out tremendously, we have a great relationship. I tried to gather myself and I made a great putt at 13.

"But it's all to the fans, they helped me get through the rest of the round and I thank them a lot.

"I learned a lot about myself and how much I have in me. I wasn't expecting what happened today to happen and I will learn from it."

Explaining Thompson's misdemeanours, the LPGA released a statement that read: "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 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 a received a two-stroke penalty. 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."

Ryu was the lucky beneficiary as she claimed a second major title after making a four in the play-off, but admits her win does not feel right.

"I cannot believe the situation. I didn't even check the leaderboard, Lexi was playing so well. I didn't expect it," she said.

"It hurts me as well, it is a weird feeling but at the same time I am proud of myself."