HOUSTON — The N.B.A. All-Star Game is returning to New York in 2015, to a borough yet to be determined.

Both Madison Square Garden and the new Barclays Center in Brooklyn have applied to host the 2015 game, Commissioner David Stern said Saturday. No other cities are currently under consideration, making it a near certainty that New York will host the game.

It also ensures that the revived Knicks-Nets rivalry will take on a new dimension as the franchises compete for one of the N.B.A.’s biggest honors.

“This is terrific,” Stern said, referring to the dueling New York applications.

There are some caveats. The league needs to determine the availability of the Jacob K. Javits Convention Center, for example, and whether it can secure the required number of hotel rooms. The league also needs the approval and support of the city. Such assessments are part of every All-Star Game application process, but no obstacles are anticipated.