The 2015 NBA All-Star Game almost certainly will be played in New York. The only question remaining for the Knicks, Nets and the league is in which arena the game will be played.

Despite the sometimes rocky relationship between the two franchises, they are working with the league to jointly host All-Star Weekend, which would mark the first time the event would be held in the metropolitan area since it was played at Madison Square Garden in 1998.

“There is progress in that the teams are working together … recognizing that it’s in both of their interests to create a basketball festival-type atmosphere around All-Star in New York, and so things are going well,” NBA deputy commissioner Adam Silver said this week.

The key stumbling block will be which state-of-the-art arena — the Nets’ new Barclays Center or the Knicks’ refurbished Madison Square Garden — will host the game.

It’s likely the solution will feature one building playing host to the Saturday night festivities, including the 3-point and Slam Dunk contests, while the other will host the game Sunday night.

Silver said the NBA still has to figure out where to hold its Jam Session. The venue best suited for it, the Javits Center, is already booked.

“We’ll work around it because we want to find a way for the most people possible to touch our All-Star Weekend, recognizing there is a capped limit on the number of people who can be in the arena,” Silver said. “We’re looking to work our way to build other events and to find a different way, a unique way to build Jam Session in New York.”

Silver downplayed the rivalry between the Knicks and Nets, and said it shouldn’t be an obstacle to them coming to an agreement on how to jointly bring an All-Star Game to New York.

“On a business level the teams get along very well,” Silver said. “From Mikhail Prokhorov and Jim Dolan and then on the business side … the nature of the sport is that the teams are highly competitive, and you want them to be, but they both recognize, too, that they’re partners in the league and this is something that is positive for both teams.”