The moment Jorge Herrera’s header beat goalkeeper Mateo Arboleda to the back post, an enormous eruption broke out on the James Madison boys soccer team’s sideline. It lasted until the triple whistle was blown, signifying the Knights’ first victory in nearly two weeks, a hard-fought 2-1 victory at Fort Hamilton.

Madison acted like it had clinched another division championship. Smiles, high fives and back slaps were handed out like candy. The celebration wasn’t necessarily unwarranted. Coach Nick Punzone’s club was without star midfielder Igor Lantsberg (on a family trip in Spain) and starting keeper Mark Shalumov (sick), and had to settle for draws in its previous two matches.

For a team that had entering the season rife with expectations – Punzone said during the preseason it was quarterfinals or bust – that was far from the start it had envisioned.

“To us, a tie is a loss,” Punzone said. “Ties are unacceptable.”

In a 2-2 tie against FDR on Monday, Madison gave up the equalizer in the final minute. The Knights had to scratch out a late tally versus Lincoln on Sept. 6 to get a mere point. And against Fort Hamilton they trailed at halftime, on the strength of Jonathan Andrade’s first-half goal.

Punzone called out his players at that point as soft, for not playing together. There wasn’t enough battle in them, he said. That quickly changed in the second half. Forward Mostafa Haridi scored five minutes in, beating sweeper Juan Garita to a through ball, and slipped it past Arboleda, the Fort Hamilton keeper. The Tigers had few scoring chances the rest of the way. Backup keeper Yuriy Trushkevych was up to the challenge, coming off his line well to take away scoring opportunities.

Madison (3-0-2) kept pushing, even as the odds for victory seemed long. The Brooklyn power began winning balls at midfield, pushing up and attacking, fighting for every inch, characteristics that had been previously missing.

“I saw fire in people’s eyes,” Herrera said.

The break finally came in the final minute, on what Punzone described as a perfect corner kick by Dimitri Foster. It traveled over the wall, past Garita, the sweeper, and Herrera met it head on, driving it past Arboleda and into the net.

“This boosts our confidence up a lot,” Herrera said. “From the start, we all expected to win. Hopefully we’ll win the rest of our games now.”

Said Punzone: “We play tough, we play hard, we will win.”

As for Fort Hamilton (2-1-1), the loss was particularly demoralizing. A win would’ve pushed the squad into a first-place tie with Brooklyn. Instead, the Tigers, who haven’t finished above .500 the last four years, sit in third.

“Take the knife out of my chest,” Fort Hamilton coach Shawn Forthofer joked. “Once they scored, it took some life out of us. We got to stay on the attack and try that much harder.”

Punzone couldn’t guarantee Madison’s troubles are quite over yet. The swagger that was lost in the recent draws won’t come back with one victory, dramatic as it may have been. Lantsberg will miss Friday’s match against Brooklyn Tech and so will Foster. But the Knights are still in first place in Brooklyn A West, a familiar perch, and should be back at 100 percent by next week.