Aly Hassan scored twice during the second half. (Photo courtesy or the Cosmos)

UNIONDALE, N.Y. — The Cosmos remained unbeaten in National Premier Soccer League action Saturday night, recording a 5-1 victory over 10-man Hartford City FC at Mitchel Athletic Complex.

Second-half substitute Aly Hassan scored twice while Junior Burgos and Ricardo Bocanegra added single tallies for the Cosmos (6-0-0, 18 points), who remained atop the North Atlantic Conference. New York’s first goal was a Hartford City (2-4-2, 8) own goal.

The Connecticut club became the first team to score against the Cosmos during the run of play in the seventh minute off a corner kick. Sebastian Stezewski fired a shot from the left side of the penalty area past goalkeeper Paul Blanchette to boost the visitors into a 1-0 lead.

Four minutes later, Blanchette was called on as he parried Luke Alvaro’s long-range chip over the crossbar for a corner kick.

New York had major problems trying to penetrate the Hartford City backline and break down the visitors for the opening 15 minutes.

The Cosmos equalized in the 19th minute off an corner kick of their own. Ansi Agolli started the scoring sequence, sending the ball into the penalty area. A scramble ensued on the left side of the box before a Aaron Dennis deflected off a Hartford defender past goalkeeper Evan Daddona for an own goal for a 1-1 deadlock.

After a Hartford City foul, Burgos boosted the hosts into a 2-1 advantage as he drilled a low, 20-yard free kick into the lower right corner in the 28th minute. It was Burgos’ third goal that he scored off a free kick.

As the half went on, the Cosmos rediscovered their mojo and made Daddona work overtime and then some, as he made five saves or punched the ball out of harm’s way.

In the 37th minute, Blanchette made a vital save as he came out of the net to deny an open Tyler Carlos in a 2-on-1 situation.

Hartford City was forced to play the remaining 34 minutes a man down after defender Andre Morrison severely fouled Burgos at midfield in the 56th minute. Cosmos head coach Carlos Mendes immediately replaced the El Salvadoran international with Giuseppe Barone.

Several minutes later, Bocanegra exacted a measure of revenge by converting a penalty kick for his first goal as a Cosmos after defender James Thompkins fouled midfielder David Diosa in the box.

The Cosmos weren’t finished. Only five minutes after he replaced Dennis, Hassan scored a nifty goal from the left side of the penalty area to up the lead to 4-1 in the 68th minute.

Hassan recorded his second when Daddona ventured out of the goal and the forward shot into an empty net for a 5-1 margin in the 84th minute.

At 5 p.m. Sunday, the Cosmos will visit the New York Athletic Club at Travers Island for another NPSL match.

After this weekend’s games, the Cosmos will play three consecutive matches on the road at the Brooklyn Italians on June 8, at Boston City FC on June 15 and then at the Rhode Island Reds FC on June 16.

They return to Mitchel to start a four-game homestand against the Greater Lowell Rough Diamonds on June 23 at 8 p.m.