As the ball rose higher and higher, shortstop AJ Lee skipped, flipped his bat and let out a roar. After Maryland baseball’s incomprehensible implosion in the top of the ninth, Lee clobbered a two-run home run to restore order in a game that had nearly slipped out of the team’s grasp.

When he reached home plate, Lee was met by a mob of teammates, spraying water on the senior who had just saved Maryland baseball’s series opener. With their backs against the wall, the Terps need wins — and help elsewhere — to make the Big Ten tournament.

While right-hander Hunter Parsons had provided an inspired start, right-hander John Murphy’s ninth-inning collapse tied the game and put a series-opening win in jeopardy. Lee bailed out his teammate with his walk-off drive to left field, a punctuation mark on an unorthodox 8-6 Maryland win over Iowa on Thursday.

“Just how we drew it up,” coach Rob Vaughn said with a laugh.

In the top-half of the frame, Murphy entered after Parsons plunked the first batter he faced with a four-run lead. He struggled with his command, walking the first batter he faced and then giving up a single. While he forced a double-play ball to get two outs in the frame, Murphy gave up a double and single to consecutive batters, bringing the Hawkeyes within one run.

From there, Iowa plated the tying run, setting up Lee’s heroics.

“It was sweet,” Parsons said. “There was no doubt about it. He hit it, and I ran out of the dugout right away. Just a ton of energy.”

Parsons, who scattered nine hits and allowed two earned runs through eight-plus innings, put together a gutsy performance. There was a time when it didn’t seem likely Parsons could talk his way past 120 pitches, convincing his coaches he should be left in to labor through another multi-runner inning with the tying run at the plate.

Now two years removed from a disastrous sophomore season, when he compiled a 12.05 ERA, there the senior was, straddling the mound as Maryland’s ace and making his final start at Bob “Turtle” Smith Stadium. It wasn’t his cleanest, but it still earned Parsons a standing ovation as he left the rubber with a 6-2 lead in hand after facing one batter in the ninth inning.

“Couldn’t do it without Coach Vaughn,” Parsons said. “He’s been here through my good times and my bad times.”

Parsons was efficient through the first three innings, with his sinker producing groundouts and his cutter inducing whiffs. He had to work around trouble the rest of the way, though.

He allowed two runners on in the fourth, fifth and sixth innings and gave up runs in the latter two. But he sidestepped most of the danger and held onto a 5-2 lead entering the eighth, courtesy of two manufactured runs in the first, a two-run homer from first baseman Maxwell Costes in the third and what appeared to be an insurance run in the seventh that instead turned out to be vital.

But Parsons was clearly laboring in the eighth, and he allowed a one-out infield single. After a pop up, center fielder Ben Norman drove a base hit into right field. With second baseman Mitchell Boe coming to the plate and two outs, Vaughn turned to pitching coach Corey Muscara to discuss the next move.

The pair decided they should bring in left-hander Andrew Vail to counteract the lefty batter. Vaughn felt conflicted on his march to the mound, however, and remained that way when talking with his senior workhorse.

“What do you want me to do,” Parsons asked Vaughn, “fight for it?”

“Yes,” the second-year coach replied.

Ultimately, Vaughn left the decision up to the three seniors gathered during the mound visit — Parsons, Lee and third baseman Taylor Wright. Lee was the first to speak up.

“I basically told Vaughn to give him the ball,” Lee said. “Let him finish the inning.”

Despite being well above 100 pitches, Vaughn departed and Parsons stared down Boe, the tying run at the plate. It was a close call — a check-swing strikeout — but Parsons leaned back, yelled and thrashed his arms, ecstatic over the escape.

“Can’t ask for much more than that,” Parsons said. “Getting the strikeout there is just surreal.”

Parsons returned for the ninth on a short leash — if he allowed a man on, he’d be pulled for Murphy. He plunked the first batter he faced, prompting Vaughn’s latest mound visit. This time, he got the ball from Parsons’ grasp. Lee hugged Parsons, and he trudged to the dugout in line for the win.

“That’s Hunter, man,” Lee said. “He’s going to compete until he has nothing left in the tank.”

But the ninth inning turned sideways from there. Iowa found holes in Maryland’s defense and Murphy struggled to get outs. He got out of it, though, with the game locked at six and ready to be broken open with one swing from Lee.

Though Maryland’s ninth-inning collapse nearly derailed Parsons’ 127-pitch performance, Lee’s blast put the finishing touches on a much-needed series-opening win, providing hope for the remaining two games with a Big Ten tournament berth on the line.

“We played with energy, we played with passion, we played with a lot of love for each other tonight,” Vaughn said. “Regardless of how … the next two days end up, if we can ring the bell that way for the next two days, I can live with the result.”