It was a game neither team wanted to lose, and, for 11 innings, a game neither team could win.

Casa Grande and Rancho Cotate high schools hooked up in a memorable baseball game that became a test of endurance Wednesday evening, with Casa's Gauchos finally prevailing, 5-4, in 12 endless innings. Zack Shimek finally ended the struggle with a one-out single in the 12th that plated teammate Iggy Llorence.

The win, coming in the first round of the four-team North Bay League Tournament, moves NBL champion Casa Grande into the tournament championship game Friday afternoon at 4 p.m. against Cardinal Newman at Santa Rosa Junior College.

Last week, Cardinal Newman handed Casa its only league loss of the season, beating the Gauchos on their home diamond, 4-2. It was just the second loss of the entire season for Casa. Cardinal Newman advanced to the tournament championship game by shutting out Maria Carrillo, 3-0.

Wednesday's game was, by any measurement, wild. There were 375 pitches, 37 outs, 25 hits, nine walks, nine runs and seven errors. Twice in extra innings Rancho Cotate scored in the top of the frame only to have Casa Grande match the run in the bottom of the inning to keep the battle brewing.

"I think all the close games we played earlier in the season helped us in the game," noted Casa Grande coach Paul Maytorena. "It was an amazing baseball game." Thirteen of Casa's 23 wins on the season have now come by a single run.

The beginning of the end of the marathon came with one out in the bottom of the 12th inning when Llorence sailed a long fly into left center field for a double, his second hit of the game.

I was just trying to hit the ball, pot put it in play," he said. Llorence hustled to third on a short passed ball, barely bating the tag. Now within seeing distance of the end, he scrambled home on Shimek's two-strike, hard hit to left field, much to the delight — and relief — of his teammates.

The belt was the second crucial hit in extra innings for Shimek, who singled with two outs in the last of the 10th to score Nate Bills with a game-prolonging run after Rancho Cotate had moved ahead, 4-3, with a run in the top of the inning. Back in the far distant past of the sixth inning, Shimek put down a bunt to squeeze home Anthony Bender with the run that tied the regulation game at 2-2.

It took the four of top Casa Grande pitchers to earn the win. Dominic Garihan started and pitched five strong innings. He gave up an unearned run in the fifth inning, allowing just four hits with only one walk and five strikeouts. When he appeared to tire after giving up the run in the fifth, sophomore Eric Parnow took over in the top of the sixth. He struggled a bit, allowing Rancho Cotate a run on one hit in the sixth, while walking three. He got out of the inning by leaving he bases loaded.

Matt Becker took over in the seventh and made an impressive start, striking out the side. When he gave up back-to-back hits in the eighth, Anthony Bender came on, and, after allowing a run to score, managed to get out of the difficulty. Bender stayed to the finish, at times struggling, but earned the win after pitching 4.1 innings, allowing six hits, walking none and striking out two.

Casa Grande defenders helped their pitchers by throwing three Cougars out at home and getting another at third on a superb play from Bender, who field a Rancho bunt with his bare hand, whirled and threw a strike to Gaucho third baseman Casey Longaker. Of course, they also hampered their pitcher with four errors.

Meanwhile, Rancho Cotate left-hander Connor Littleton kept the Gauchos away from home plate. He pitched seven and a third strong innings, finally giving way to Nosh Rogerson in the eighth. Littleton allowed three runs on six his, walked three and struck out three.

Rancho Cotate received game-saving plays from its outfielders. Twice Cougar right fielder Ryan Walsh made running grabs with his back to the infield to take extra base hits away from Llorence. In the 11th inning, center fielder Adam Nelson dove to steal a hit from Bender that looked like it would end things by driving home Longaker from third base with two outs.

It was that kind of game.

Casa Grande handed Rancho Cotate the game's first score, putting Nelson on board in the fifth inning on an infield error and throwing away a sacrifices bunt to allow the run to score. The Cougars added a second run in the top of he sixth on a bases-loaded walk. That rally might have been bigger had Casa not thrown a runner out at the plate on the tag end of a run-down with runners at first and third.

Casa Grande, frustrated through its first five at bats, rallied to tie the game in the sixth on two sacrifices, one a fly hit by Llorence and the other a perfect squeeze bunt by Shimek.

Neither team scored in the seventh and then it was tick and tack as the game wore into extra innings.

Piner got a run in the top of the eighth on three hits, one a squibber and one on the infield, but Casa Grande answered on a long double by Anthony Garetti that eventually led to a run on a force out, with Charlie Parnow hustling to beat a potential game-ending double play throw.

Piner forged ahead with a run in the top of the 10th on an infield error, single and a force out, but again Casa answered, scoring in the bottom of the inning on Nate Bills double and another crucial Shimek hit.

Kaiser's spectacular two-out catch stymied Casa in the 11th, but in the 12th, it was Llorence, Shimek and a walk to the dugout for the Gauchos, just as soon as they got untangled from their celebration.

Bender, Llorence, Shimek, Longaker and Francis Christy each had two hits to show for their long day's work.

The win leaves Casa Grande with a 23-2 record for the season. The Gauchos finished their run to the NBL championship with a 13-1 league mark.