As the final seconds ticked off the clock in stoppage time, Charleston Battery midfielder J.C Mack came storming down the left flank.

Mack reached the penalty area and crossed the ball to a wide open Jose Cuevas in the middle of the field. Cuevas, the Battery’s second-leading scorer this season with eight goals, volleyed the ball toward the open net. Wilmington keeper Alex Horwath slid across, but was too late as the ball sailed just past his outstretched fingers.

It would have been the perfect ending for the Charleston Battery. But nothing about the Battery’s game with the Wilmington Hammerheads went according to plan Friday night.

Cuevas’ volley hit the bottom of the crossbar and Horwath pounced on the loose ball to end the threat.

A few seconds later, the referee blew his whistle and Charleston had to settle for a 2-2 tie with the Hammerheads before a crowd of 3,357 at Blackbaud Stadium.

The two teams, who are battling for playoff position, will meet again tonight at Legion Stadium in Wilmington, N.C. The Battery (11-8-1, 34 points) remained in third place, leading Wilmington (8-6-8, 31 points) by three points in the USL Pro Division standings.

Despite dominating large chunks of the game, it was a disappointing result for the Battery. The Battery outshot the Hammerheads, 16-3, and had more than triple the scoring chances, including Cuevas’ opportunity at the end of the game.

“It was frustrating because we probably should have had four or five goals tonight,” said Battery midfielder Tony Donatelli, who had four shots during the match. “It wasn’t the result we were hoping for. We wanted to get the three points, but we were a bit unlucky tonight. I really thought we played well in the second half and had our chances to win. We need to put this game behind us and get ready for (tonight’s) game.”

The Hammerheads had just one shot in the first half, but made the most of it when Andres Cuero scored on a set piece in the 35th minute to give Wilmington a 1-0 lead at halftime.

“I told the guys we needed to keep our composure,” said Battery coach Mike Anhaeuser. “We had played pretty well defensively in the first half. We made one mistake and it ended up in the back of our net. I thought if we continued to pressure them, we’d get our chances in the second half.”

The Battery came out and did just that, pressuring Wilmington from the opening kickoff. Donatelli nearly scored on a spectacular bicycle kick in the opening minute of the second half.

Five minutes later, Nicki Paterson tied the game in the 50th minute with his 10th goal of the season.

“Nicki’s been scoring big goals for us all season,” Anhaeuser said.

Donatelli appeared to score on a header, but the referee called a foul on the play in 56th minute.

The Battery took a 2-1 lead on Taylor Mueller’s first professional goal in the 77th minute.

“Just hard work in front of the goal, and Taylor was at the right place at the right time,” Anhaeuser said.

But the celebration was short-lived as Steve Perry tied the game in the 81st minute off a miscue in the back.

The match was chippy at times with hard challenges all over the field as the two teams combined for 23 fouls and six yellow cards.

“We knew they were going to be physical and we had to match that,” Anhaeuser said. “I don’t expect (tonight’s) game to be any different.”

The Hammerheads are a perfect 7-0-3 at Legion Stadium, which features a smaller, artificial playing surface. One advantage for the Battery will be the return of middle defenders Colin Falvey and Kyle Hoffer, who were serving a one-game suspension Friday night after receiving a red card against Orlando City in the Battery’s last game.

“Wilmington is a totally different team at home,” Anhaeuser said. “They play a different style up there. Having Colin and Kyle fresh should help. If we generate chances like we did tonight, we’ll be OK.”