NEW YORK – When the Cosmos needed it most, midfielder Emmanuel Ledesma put the team on his back and helped the defending champions reach their fifth consecutive postseason.

Ledesma was named North American Soccer League player of the week Monday after an impressive hat-trick performance at MCU Park Saturday night. The former Middlesbrough man scored three times in a 16-minute span in the second half to help the Cosmos post a 5-2 win over Puerto Rico FC.

New York entered Saturday night’s game needing a positive result to clinch the fourth and final spot in The Championship, the league’s four-team postseason tournament. With the Cosmos down a goal early in the second half and Jacksonville Armada FC winning in San Francisco, New York’s postseason hopes were hanging in the balance.

Ledesma came to the rescue The 29-year-old midfielder evened the score at 1-1 in the 51st minute from 22 yards. Two more goals followed in the 56th and 67th minutes for a 3-1 advantage.

With a hat-trick already to his name, Ledesma wasn’t finished. The Quilmes, Argentina, native sent in a cross that was finished by captain Carlos Mendes in the 75th minute, putting the game out of reach.

The victory was enough to earn the Cosmos a semifinal matchup against spring and fall Season champion Miami FC.

The 5-11 Ledesma finished regular-season play with 10 goals and six assists, which put him in the top five in the NASL in both categories.

Ledesma joined the Cosmos in March after playing in some of the top leagues in Italy, England, Argentina, and Greece.

The Cosmos will travel to South Florida to square off with Miami FC at Riccardo Silva Stadium on Sunday at 5 p.m. ET. The game will be nationally televised on beIN SPORTS (English), beIN SPORTS en Español (Spanish) and beIN SPORTS CONNECT (Digital).