When the U.S. Chess Championship began 12 days ago, it seemed a given that either Minnetonka chess grandmaster Wesley So would repeat as national champion or one of the two other super-elite U.S. players would wrest the title from him.

But when the 12-player championship ended Sunday, it was an unheralded California grandmaster, Sam Shankland, who won the national title in a shocking upset.

With So and two other Americans all ranked among the top 10 in the world, the U.S. tournament is the toughest national championship in the world. And it was unthinkable that one of those three wouldn’t win it, as one of them has in each of the past three years when they’ve all competed.

So won the title last year, but he finished in third place this year, going undefeated with two wins and nine draws. That earned him a $25,000 prize.

Shankland, who was ranked 70th in the world, went on a tear, winning six games and drawing five, to win his first U.S. championship.

Shankland’s victory is akin to a baseball team with a sub-.500 record getting a wild-card spot in the playoffs and going on to win the World Series.

“It’s beyond my wildest dreams! I never thought I had a chance to win this tournament,” Shankland said when interviewed for the livestream broadcast from the St. Louis Chess Club. “Things clicked at the right time and I don’t even know how it happened.”

So described Shankland’s play as a “very shocking performance, very impressive.”

So said he was disappointed in his own play.

“I don’t think it was a disaster,” he said. “But I think it wasn’t good either. It was just a bad tournament [for me].”

As a result of this tournament, So dropped one place in the world rankings, to No. 8. Next up for him is a super-elite tournament in Norway, with all 10 players being ranked among the top 13 in the world, and including the world champion — Norwegian Magnus Carlsen. That tournament, which begins in late May, will kick off a 50-day stretch of tournaments in Europe for So.