South Korea’s In-Kyung Kim held off a brilliant challenge from Jodi Ewart Shadoff of England to claim an overdue first major title in the Women’s British Open.

Kim saw her six-shot overnight lead cut in half thanks to a superb run of scoring from Shadoff, who followed a birdie on the 2nd with five in a row from the 6th and another on the 13th. The 29-year-old from Northallerton then made a birdie at the 17th to close the gap to two and parred the last to complete a 64, equalling the course record set on day one by Michelle Wie and matched by Inbee Park in round three.

However, Kim, who famously missed a one-foot putt to win the Kraft Nabisco Championship – now called the ANA Inspiration – in 2012, was able to par the final five holes for a closing 71 and winning total of 18 under par.

Shadoff’s runners-up finish is her best result in a major and secured a place on Europe’s Solheim Cup team to take on the USA in Iowa from 18-20 August. “I’m so excited,” she told Sky Sports. “My last Solheim [in 2013] was the best experience I’ve had on a golf course so I’m looking forward to doing it again and trying to take the trophy back.”

Speaking about her round, Shadoff added: “No dropped shots around here, especially in these conditions, I couldn’t have asked for anything better. I played really solid and holed a lot of putts.

“I just told myself to take the opportunities when they came because the last five or six holes are the hardest on the course and you never know what can happen around there.

“I think playing last week in the Scottish Open really helped me with the weather and the wind and everything. I’ve typically never played well in links golf but this year I’ve been working with [the coach] David Leadbetter a lot and he’s helped me control my ball flight.”

England’s Georgia Hall managed a final round of 70 to share third place with Wie and Germany’s Caroline Masson.

Wie closed with a six-under 66 to post her best major finish since winning her sole major, the 2014 US Open. Sally Watson, the only Scot left, had a disappointing 76 to finish at four over in her last tournament before retirement.

There was a serious battle for the Smyth Salver for the leading amateur involving England’s Sophie Lamb and Leona Maguire of Ireland, last year’s winner, and it was Lamb who came out on top.

She finished tied for 31st place on six under par and, after coming through a play-off in the Monday qualifier to make the tournament, she was delighted. “It’s all been crazy,” she said. “It’s something everyone dreams of when they first play golf. It’s been a great experience for me to see where my game compares to the best in the world.”

Europe will have four rookies in their side when they attempt to regain the Solheim Cup after the captain, Annika Sorenstam, named her wild cards for the biennial contest against the United States.

Sorenstam described her decision to select Anna Nordqvist, a fellow Swede, as a “no-brainer”, with the world No12 being Europe’s highest ranked player despite battling glandular fever. And there was also no surprise to see Masson selected for a third Cup appearance, but the captain has taken the gamble of picking the rookies Madeline Sagstrom and Emily Pedersen to complete her 12-strong team.

The wild cards join the automatic qualifiers: Georgia Hall, Florentyna Parker, Mel Reid, Carlota Ciganda, Suzann Pettersen, Charley Hull, Karine Icher and Shadoff.

The USA captain Juli Inkster, meanwhile, overlooked the experienced Paula Creamer in favour of adding the rookies Angel Yin and Austin Ernst to the qualifiers Lexi Thompson, Stacy Lewis, Gerina Piller, Cristie Kerr, Jessica Korda, Danielle Kang, Wie, Brittany Lang, Brittany Lincicome and Lizette Salas. Trailing 10-6 heading into the singles in Germany in 2015, Inkster’s side turned their fury at a controversial incident into a brilliant fightback to avoid an unprecedented third straight defeat.

In a fourball match carried over into the final day, Pettersen and Hull were all square with two to play against Lincicome and Alison Lee.

Lee missed a birdie putt to win the 17th and, after the ball finished two feet behind the hole, scooped it up with her putter thinking it either had been, or was certain to be, conceded.

Hull gave that impression as she was already walking across the front of the green towards the 18th tee, but Pettersen said they had not conceded the putt and therefore won the hole.

Europe’s captain, Carin Koch, approached the match referee on the 18th to ask if there was anything she could do and was told they could concede the hole, but opted not to after Pettersen insisted she was not going to concede Lee’s putt.

Hull and Lee were reduced to tears as heated discussions took place around the green, with Inkster wanting to lead some of her team in a chant of “Europeans suck” before they opted for “Class, style, U-S-A”.