Jimmy Maurer could not stop all of the Deltas’ shots. (Photo courtesy of the Cosmos)

SAN FRANCISCO — There will be no threepeat for the Cosmos.

The San Francisco Deltas recorded a 2-0 victory over New York to secure the North American Soccer League title in The Championship final at Kezar Stadium Sunday night.

Whether it was the NASL’s final match, it remains to be seen as the league is trying to retain its Division Two status for the 2018 season in court.

The Cosmos fell short in their attempt to earn their fourth NASL crown in five tries since returning to competitive soccer in 2013. They had captured championships in 2013, 2015 and 2016.

“I’m very proud of our guys and the effort they put into this match,” Cosmos head coach Giovanni Savarese said. “It was a difficult field to play on, and we couldn’t find the goal tonight.”

Tom Heinemann tallied the first goal of the night, a controversial penalty kick call in the 19th minute.

Second-half substitute Devon Sandoval scored on the final kick of the night five minutes into stoppage for the insurance tally. Kyle Bekker forced goalkeeper Jimmy Maurer to come out of the net and the latter slipped and Bekker slipped the ball to Sandoval, who scored into an empty net seconds before the final whistle was blown.

“We want to congratulate the Deltas on their win,” Savarese said. “They are a great team and played well tonight.”

The PK was set up by a rather unusual play.

A ricocheted ball bounded back into the penalty area. Maurer bolted for the rolling loose ball while the Delta’s Jackson had the same idea. Maurer appeared to get to the ball at the same time Jackson did, but referee Rubiel Vazquez ruled a penalty kick, despite protests by the goalkeeper.

On the ensuing spot kick, Heinemann powered his attempt into the middle of the net while Maurer dove to his right.

The opening half was contentious, to say the least, with 14 fouls called and three yellow cards awarded.

Playing a physical game, New York accrued 10 fouls by the interval, compared to the Deltas’ four.

San Francisco, however, had two players booked — Tyler Gibson and Heinemann — while Cosmos right back Jimmy Mulligan saw yellow.

Brian Peiser was solid in the San Francisco goal in the first half, saving Javi Marquez’s bouncing shot off a corner kick in the eighth minute and Juan Guerra’s hard foul in the goalmouth off another corner a minute later.

Cosmos captain Carlos Mendes, playing in his final professional match, hit Heinemann in the head with his forearm in the 30th minute, but was not sanctioned.

New York tried to equalize in the second half, but the visitors’ efforts were in vain.

Emmanuel Ledesma fired a shot from the right side of the area, but Peiser smothered his try in the 64th minute. Six minutes later, second-half substitute Lucky Mkosana tried a cheeky effort past the keeper, but Peiser made the save.

Peiser hobbled around for virtually the entire second half with a lower back injury as he limped noticeably.

The Cosmos attempted 13 corner kicks, but could not solve San Francisco’s solid backline and Peiser.

The loss marked the end of the career of Cosmos captain Carlos Mendes, who announced that he was going to retire after this season.