Jimmy Maurer just about stood on his head to deny Miami FC again and again. (Anthony Gruppuso/USA TODAY Sports)

MIAMI — The Cosmos were outshot by Miami FC by a ridiculous 22-4 margin Saturday night, but the only stat that mattered at Riccardo Silva Stadium was the final score.

And that was 2-0, as in a Cosmos win over Miami FC.

Only a week after dropping their home-opener at MCU Park to the very same Miami FC side, 3-0, the Cosmos survived a barrage of shots to score their first goal of the North American Soccer League spring season and register their first win.

With a goalkeeping performance for the ages, veteran Jimmy Maurer, playing in his 100th Cosmos game, supplied the defensive heroics with eight saves and midfielder Danny Szetela and defender Ayoze provided the offense.

Szetela, who had tallied five goals in his 85 previous Cosmos appearances, connected for the goal in the 58th minute.

Substitute defender Ryan Richter, who had replaced Richard Menjivar only two minutes prior, penetrated deep into the Miami FC zone and crossed a right-sided pass to the diving Szetela. He redirected the ball into the far left post.

Danny Szetela dives to meet Ryan Richter's cross to give the New York Cosmos the lead on the road. #MIAvNYC

تم نشره بواسطة ‏‎North American Soccer League (NASL)‎‏ في 8 أبريل، 2017

Video courtesy of NASL Facebook page

Up until that point, the hosts had outshot the Cosmos, 14-1, with Euguene Starikov having placed the first New York shot of the season on target in the eighth minute.

Ayoze, the left back, converted a penalty kick four minutes into stoppage time after former Cosmos Hunter Freeman fouled second-half sub Walter Restrepo in the box.

Before and after Szetela’s score, the game was all Maurer’s and then some as he twice was helped by the woodwork. Stefano Pinho rammed a shot off the right post in the 38th minute and former New York City FC midfielder Kwandwo Poku in the 54th minute.

Many observers would call that luck.

No problem because the rest of the night was all Maurer’s skill.

In perhaps his best performance of his five-year Cosmos career, Maurer was magnificent.

The Cosmos held their own early on before Miami came at them in waves for the rest of the opening half.

Maurer denied the hosts twice within seconds in the 18th minute, first stopping Vincenzo Rennella and then former teammate Hunter Freeman on the rebound in a pair of bang-bang plays.

Less than a minute into the second half, Maurer saved Vincenzo Rennella’s effort from the right side and stopped Stefano Pinho on a 1 v 1 situation in the 49th minute.

He continued his stellar play into the 72nd minute, producing a diving save on Dylan Mares, who scored against the Cosmos last week.