Ayoze connected for his first brace in the Cosmos win. (Photo courtesy of the Cosmos)

LAUDERHILL, Fla. — The Cosmos helped their quest to the North American Soccer League playoffs with a resounding 4-1 victory over Puerto Rico FC Wednesday night.

Defender Ayoze had the first and last words for New York, scoring the first goal in the 35th minute and put the exclamation point on the win with a penalty kick in the 83rd minute.

The result lifted the Cosmos (9-7-14, 41 points) into sole possession of fourth place in the combined standings, two points over Jacksonville Armada SC (9-9-12, 39). Eight-place Puerto Rico (19) fell to 3-16-10.

Thre three-goal win was the Cosmos’ largest margin of victory this season.

The Cosmos can clinch a playoff spot if they defeat host Jacksonville Sunday at 4 p.m.

Wednesday night’s game was moved from Puerto Rico due to the devastation caused by Hurricane Maria.

“It was a great result. We needed this result,” Cosmos head coach Giovanni Savarese said. “We did a lot of good things today, we found the goals with the opportunities, and I’m pleased with the performance.”

The first half saw the Cosmos get the better of the chances while taking advantage of them.

In the 20th minute, Jimmy Mulligan got a shot from the edge of the penalty area, but was denied by the crossbar.

Less than 15 minutes later, Pablo Vranjicán was taken down outside the box to give New York a free kick in a dangerous area. Ayoze made the most of it by putting the free kick over the wall and past diving goalkeeper Austin Pack for a 1-0 lead in the 35th minute.

The Cosmos doubled the lead six minutes later as Juan Guerra found Eugene Starikov with a cross inside the box. The Ukrainian brought it down and with his back to the goal, finished the play with a bicycle kick to put the Cosmos up 2-0.

Puerto Rico nearly got one back before the break as Emery Welshman’s blast went high above goalkeeper Jimmy Maurer and over the bar.

With a steady rain falling in the 73rd minute, the Cosmos added to the advantage as Starikov found Bledi Bardic with a through ball inside the box and the Montenegrin native buried a low shot past Pack to make it 3-0. The goal was Bardic’s second in nine games.

Ayoze completed his brace a few minutes later by converting a penalty kick as Pack dove the wrong way for a 4-0 lead. His goals were his first brace in a Cosmos uniform and puts him in a three-way tie for third on the club in scoring with five goal.

Puerto Rico FC got on the scoresheet as substitute Jorge Rivera received a pass from Rudy Dawson and scored in the 89th minute.

“It was a positive match,” Savarese said. “Not only because of the result, but also because of the way the guys played the match.”