A surprise 10th-inning upset by Spain on Sunday knocked Israel out of the World Baseball Classic, bringing to a sudden end Israel’s first attempt to claim the world title on the diamond.

Spain came out ahead 9-7 in the dramatic five-hour game on Yunesky Sanchez’s two-run single up the middle.

Israel took a two-run lead early on, but allowed Spain to get back into the game and win in the extra inning.

The match, played in front of a largely Jewish crowd in Jupiter, Florida, was a single-elimination qualifying game, meaning that Spain will advance to the main tournament (to be held in March 2013).

Israel, packed with Jewish-American pro players, was considered the better team, but was sent packing after a promising start. It had beaten Spain in another match on Friday.

“To tell you the truth, we couldn’t believe it,” Spanish manager Mauro Mazzotti told MLB.com. “We knew, as we’ve told them since Day 1, on any given Sunday, anybody can beat anybody. And we did it.”

Israel's Josh Satin (2) is congratulated after scoring on a double by Charlie Cutler against South Africa in the eighth inning of a World Baseball Classic qualifier baseball game in Jupiter, Florida, on Wednesday, September 19, 2012 (photo credit: AP Photo/Alan Diaz)

Israel’s Josh Satin (2) is congratulated after scoring on a double by Charlie Cutler against South Africa in the eighth inning of a World Baseball Classic qualifier baseball game in Jupiter, Florida, on Wednesday, September 19, 2012 (photo credit: AP Photo/Alan Diaz)

Because of the tournament rules, which allow players who are eligible for citizenship to compete for their host country, Israel’s team consisted mostly of Jewish-Americans, many of whom were professionals from the US minor leagues, as well as players like former Met Shawn Green and manager Brad Ausmus, a former MLB All-Star. White Sox first baseman Kevin Youkilis had said he would play for Israel if it made the next round.

“Other than the fact that we lost the final game, it was a very positive experience across the board,” Ausmus said of the tournament. “It’s a little bit of a tough pill to swallow now, but I think there’s a lot of positive things that can still come from this, and hopefully one of them is the prosperity of baseball in Israel.”

The organizers of the Israeli team hope to build the profile of baseball in Israel, and Ausmus told the New York Times that he hopes that in 25 years, Israel will be able to field an international team of native Israelis.