The Liberty's Shavonte Zellous handles the ball against the Wings...

The Liberty's Shavonte Zellous handles the ball against the Wings during a game at Madison Square Garden on Friday, June 2, 2017. Credit: Steven Ryan

It was the final straw.

After watching the Liberty get eliminated in a single-game playoff for the second straight year, James Dolan decided he had seen enough. That’s when the chairman and chief executive of Madison Square Garden made the decision to sell his WNBA team, according to two league sources.

Dolan, who told HBO’s “Real Sports” in 2016 that the team never had been profitable, had been considering selling for at least three years, sources said. Still, in terms of impactful defeats, it is hard to think of a bigger one than the Liberty’s playoff loss to the Mystics on Sept. 10. It not only was the Liberty’s last game of the season but possibly its last game at Madison Square Garden and perhaps even its last game in New York.

That’s right. There is no guarantee that the Liberty, the anchor franchise of the country’s most successful women’s professional sports league, will be playing in New York in the 2018 season.

On Friday, Madison Square Garden declined a request to comment on any negotiations. However, a source close to the situation said MSG “has received offers from a number of serious buyers — all focused on New York — further demonstrating the value of the Liberty franchise.”

The league seems determined to do everything it can to keep it here.

“The Liberty is an original WNBA franchise that has played 21 seasons in New York,” WNBA commissioner Lisa Borders told Newsday on Friday. “We certainly want to keep the team in this iconic city.”

In a recent interview with Mike Francesa, NBA commissioner Adam Silver said there are “several New Yorkers” who have stepped forward and shown interest in buying the team. He went on to confirm what many have suspected: The biggest reason MSG is selling the Liberty is it wants the dates back, opening the venue for higher-revenue events such as concerts.

“Part of the issue for Madison Square Garden is it’s the most expensive building in the world to operate,” Silver said. “It’s not only expensive to operate, but for each WNBA date, it means you can’t put a concert in that night, which is arguably more profitable than having a women’s basketball game.”

Unfortunately, the Garden probably can make more money booking the Professional Bull Riders competition and 13 straight nights of Phish concerts than it can by featuring some of the greatest female athletes in the world.

The Liberty’s average attendance this past season was 9,889, which is fourth in the league but only about half of the arena’s 20,789 capacity.

An average of just under 10,000 fans a game in a 21-year-old league is nothing to sneeze at, however. At the same age, in 1966-67, the NBA averaged only 6,631 fans. As recently as 1982-83, the Knicks averaged 10,703 for a 44-win team.

The ideal solution for the Liberty would be to play in a mid-size arena such as the Connecticut Sun’s 10,000-seat arena at Mohegan Sun or the 10,000-seat Wintrust Arena, which was built in Chicago as a home for the WNBA Sky and DePaul University.

Where could the Liberty play without moving out of New York?

The Liberty did not draw well when it moved to the Newark-based Prudential Center in 2011 while Madison Square Garden was being remodeled. Nassau Coliseum hasn’t been approached by anyone interested in moving the team there, according to a source. Barclays Center, which already is eager to get rid of a poor-drawing Islanders team, doesn’t seem to be a likely destination.

As far as smaller venues, St. John’s Carnesecca Arena holds 5,602 and is not ideally located. The Westchester County Center, which is home to the Knicks’ G League team, has a capacity of 5,000. Both would be a big comedown after 21 years at the Garden

From a win-loss perspective, the Liberty has been the most successful professional basketball team in New York in the past 21 years. Though it never won a championship, it has gone to the playoffs 15 times.

Over the years, the team has given its tight-knit cadre of hardcore fans a lot to cheer about. Dolan was the last of the original team owners and did give the franchise 21 years to establish itself.

Here’s hoping there’s a new owner out there who can take it to the next step.