If the San Francisco Deltas are to win the North American Soccer League title in their first season, it’s only fitting that they will have to beat the league’s most storied club to do so.

The Deltas will face off against the defending champion New York Cosmos in the NASL championship game at Kezar Stadium at 5 p.m. Sunday.

The Cosmos are arguably the most famous American soccer team. During their first iteration in the original NASL in the 1970s and ’80s, the Cosmos fielded some of the most famous players in the world, including Brazil’s Pele, Germany’s Franz Beckenbauer and Italy’s Giorgio Chinaglia.

The original Cosmos folded with the NASL in 1985. In 2013, the brand was reborn in the newly reconfigured NASL, which is the second division of soccer in the United States below MLS. The Cosmos have been just as ambitious since restarting, even bringing on Spanish star Raul for their first three seasons. They have won three of the past four league championships.

Meanwhile, the Deltas have been a success on the field but averaged just under 2,600 fans per game during the regular season and are reportedly going to lose several million dollars. Sunday night’s championship game might be the team’s final chance to attract the support of Bay Area sports fans.

“As a first-year expansion club, it’s a dream come true. We’re excited that we get to play at home and go for our first title,” said Deltas midfielder Tyler Gibson, who scored the winning goal in the team’s semifinal against North Carolina FC to advance San Francisco to the title game, also known as the Soccer Bowl.

San Francisco has been one of the most consistent teams in the league, losing only two of its final 16 regular-season games. New York endured a nine-game winless streak in August and September before turning its fortunes around in the last month of the regular season. The Cosmos went undefeated in their final six games to secure the final playoff spot.

The teams have met four times this season. In the spring season, New York defeated San Francisco 1-0 in April at Kezar, and the Deltas earned a scoreless draw in May in New York.

In an August fall-season game, the Deltas got goals from defender Patrick Hopkins and Tommy Heinemann (on a penalty kick) for a 2-1 victory.

The team’s last game on Sept. 20 in New York was their most dramatic. The Deltas fell behind by two goals and went down a man when Michael Stephens was shown a red card in the 61st minute. But San Francisco responded, with striker Devon Sandoval scoring two goals in the last 10 minutes to secure a draw.

The championship game will be a matchup of two of the best soccer minds in America, Cosmos head coach Giovanni Savarese and Deltas head coach Marc Dos Santos.

“We respect each other a lot,” said Dos Santos. “We both are very passionate about our group of players, very passionate about our teams, and that’s it. When the game starts, that friendship doesn’t need to be there, and the one that deserves it more will win the game.”

There is a chance that Sunday’s game could be the last for the league. In August, the NASL’s Division 2 status was revoked by the United States Soccer Federation. The league is fighting the decision in federal court, but its petition for a preliminary injunction to keep its sanctioning for next season was denied.

During the preliminary injunction hearing, it became public that the Deltas have not committed to playing next season. Cosmos owner Rocco Commisso has said he will keep the team alive only if the NASL continues to have Division 2 status.

Douglas Zimmerman covers soccer for The Chronicle’s free website, SFGate.com.

Sunday’s game

Who: New York Cosmos vs. San Francisco Deltas

What: The Soccer Bowl, the NASL’s title game

Where: Kezar Stadium

When: 5 p.m.