Stanford junior forward Zach Batteer scored a goal for the ages. The unranked Cardinal nearly pulled off a win for the ages. After 110 minutes of intense soccer, Stanford had to settle for a hard-earned 3-3 draw with visiting Maryland, the No. 2-ranked team in the country in the NSCAA coaches poll.

Considering the Terps (0-0-1) lost in the semifinals of the College Cup in a shootout last season to Georgetown 4-3, Cardinal coach Jeremy Gunn was rightly proud as a peacock after the match.

“All we ask of our players is to leave everything on the field,” Gunn said. “We competed the entire game, played some great soccer and scored some great goals.”

“It was the first game of the year,” Maryland coach Sasho Cirovski said. “There were some opportunistic goals by both sides and some great goals. It was a game we could have won and could have lost.”

Stanford (0-0-1), outshot by the Terrapins 17-13, came out like their britches were on fire, taking it to the heralded Terps. The Cardinal flirted with the net a couple of times before Aaron Kovar ripped a shot from 20 yards out. The ball deflected off of the right leg of Maryland defender Alex Crognale and into an open goal, vacated briefly by Terrapins freshman goalie Zack Steffen. The own goal gave the Cardinal a 1-0 lead in the seventh minute.

Minutes later, Stanford goalie Drew Hutchins made a tough save on a 1-v-1 situation. Hutchins had four saves, three of them game-savers.

The game got more physical as it went on with both sides exhibiting their testiness with referee Ioannis Stavridis, who issued six yellow cards and a red card. The red card went to Stanford’s Brian Nana-Sinkam late in the first 10-minute overtime. That meant the Cardinal had to play a man down the final 10 minutes, another reason for Gunn to spread his wings.

The Terps had last year’s Hermann Trophy winner, Patrick Mullins, on the pitch. The Cardinal, though, did a good job of marking Mullins for much of the match. Defenders Jimmy Callinan and Brandon Vincent had outstanding efforts for the Cardinal.

Right after a stop by Vincent, the Cardinal went on a breakaway with Callinan on the run. Callinan passed to freshman Jordan Morris, who dished to Batteer, who powered the ball into goal in the 35th minute, putting Stanford up 2-0.

A Cardinal penalty set up Maryland’s first goal. Ambrose took the free kick from outside the box and set up Mullins, who headed it into goal in the 40th minute.

The Terps tied the match in the 54th minute on another set play when Schillo Tshuma headed in a corner from Jane Sunny. the ball skimming off Tshuma’s hair.

Five minutes later, Batteer took off with the ball, dribbling in front of both benches. He beat one defender, then another. Batteer muscled past a third defender, controlling the ball before drilling a shot past a charging Steffen. The crowd of 1,196 went berserk as Stanford, up 3-2, was on the brink of an upset.

“That was a world-class goal, wasn’t it?” Gunn asked after the match.

“I remember getting the ball halfway,” Batteer said. “From there, it was just instincts. I saw a little bit of space and pushed behind them. I was able to run on to it and finished it.”

The brilliant play of Morris, a freshman, and Batteer impressed Cirovski.

“Their two forwards were outstanding,” Cirovski said. “Morris and Batteer are very good forwards with exceptional speed. We have a very young backline and Stanford took advantage of it, especially in the first half.”

It appeared Stanford was going to pull off the stunner when captain JJ Koval lined up for a PK in the 85h minute after being pulled down in the box. Koval’s shot, however, hit the top post and bounced off. Had it gone in, the Cardinal would have a two-goal cushion with fewer than five minutes to play.

“Soccer isn’t a perfect game,” Koval said. “You move forward. I stepped up to take it. I’m expecting to finish it. I didn’t do that, but it goes in the next time.”

The Terrapins seized the momentum, getting the equalizer off another set play when Jake Pace headed in a corner by Tsubasa Endoh in the 86th minute.

“The exciting thing for us was how hard we worked, what incredible spirit we showed,” Gunn said. “Maryland has phenomenal players. You have two heavyweight boxers out there, they’re both going to be exchanging punches.”

Email John Reid at jreid@dailynewsgroup.com; follow him at twitter.com/dailynewsjohn.