Bledi Bardic scored the game-winner and set up another goal in the Cosmos B victory. (Photo courtesy of the Cosmos)

BRUNSWICK, Maine — For most of the National Premier Soccer League season, Cosmos B has not been tested very much.

The team would jump out to a three- or even a four-goal lead and coast the rest of the way.

That might not have been the best way to prepare for the playoffs, when the team probably will play more difficult teams and have closer contested games.

On Saturday afternoon, Cosmos B was tested against the Seacoast United Mariners at Bowdoin College.

The visitors allowed a two-goal lead to slip away before halftime substitute Bledi Bardic recorded the game-winner in the 81st minute en route to a 4-2 win.

The win gave Cosmos B a perfect 7-0-0 mark and 21 points atop the North Atlantic Conference Division as the team took another step toward the postseason. Seacoast, which is in 11th and last place, fell to 0-5-1.

It was not known whether New York had clinched a playoff berth because the 11 teams in the conference have not played the same amount of games. The regular season for this division is 10 matches. The top four teams will qualify for the postseason, which will commence in July.

Bardic led the visitors with a goal and an assist. John Neeskens, Jalen Brown and Darwin Espinal also scored.

Neeskens, a defender, lifted Cosmos B into the lead on the half hour as he fired home a shot from outside the penalty area.

In the 53rd minute, Bardic set up Brown with a low cross to Brown in front of the net as the latter knocked it home for a 2-0 lead.

But that advantage did not last as the Mariners tallied in the 65th and 72nd minutes to knot things up at 2-2.

Bardic snapped the tie in the 81st minute and Espinal gave Cosmos B some breathing room by converting a penalty kick two minutes later.

Cosmos B will host the Elm City Express of New Haven, Conn., the 2017 NPSL champions, at Hofstra Soccer Stadium in Hempstead, N.Y. next Saturday at 7 p.m.