PHILADELPHIA (AP) -- Kyrie Irving tried to keep playing through pain, a cortisone shot no longer providing enough relief.

Eventually, he and the Brooklyn Nets decided it’s best to get his right shoulder taken care of now and get healthy for next season — when Irving and Kevin Durant can finally play together.

Irving will have arthroscopic surgery and miss the rest of the season, Nets general manager Sean Marks said Thursday.

“Kyrie mentioned he was playing through pain and you have to give him a lot of credit for that. He wants to be out there and playing with his guys,” Marks said. “But there comes a point where you say enough is enough and again, it goes to long-term health. And the best thing that (we) could do is to shut it down and get this taken care of once and for all.”

Kyrie Irving will have arthroscopic surgery on his shoulder. He will be out for the remainder of the 2019-20 season. pic.twitter.com/HOuNdyCLrF — Brooklyn Nets (@BrooklynNets) February 20, 2020

Coach Kenny Atkinson said the point guard was still having trouble with the shoulder that began troubling him in October and sidelined him for 26 games earlier this season.

“Some days it was OK and other days it bothered him,” Atkinson said before the Nets faced the Philadelphia 76ers. “Obviously, it is difficult to perform under those circumstances.”

Irving said pain in the shoulder initially worsened after a game on Nov. 4. The Nets then went on a five-game road trip, where Irving continued to play until the pain got so bad he was having trouble lifting his shoulder.

He got a cortisone shot on Dec. 24 and was able to return on Jan. 12, but he acknowledged that surgery might still be necessary. Irving met with a specialist this week and by deciding to have a procedure now, his first season in Brooklyn ends after just 20 games.

Irving averaged 27.4 points, with a 50-point game on opening night and a 54-point performance against Chicago on Jan. 31. He played only one more game after that.

Marks said the Nets would have more information about Irving’s recovery process after the surgery, but expects that he will be back for summer workouts.

GM Sean Marks: 'We're looking at the big picture here'

Irving, who signed a 4-year, $141 million contract with the Nets last summer, is averaging 27.4 points, 5.2 rebounds and 6.4 assists. Atkinson said Irving was even better than he expected after watching him play in Cleveland and Boston.

“I really love the player and feel like we had a really good relationship. We are in a really good place, but obviously you want more. More reps, more time with him,” Atkinson said. “But we’ll have time in the offseason to connect and work with him a little bit.”

Irving missed the last five games before the break with a sprained right knee. He now joins Durant on the sideline; the superstars signed with the Nets together in July. Durant has been out all season while recovering from surgery to repair his Achilles tendon.

Assuming both are healthy to start the 2020-21 season, the Nets could become one of the top teams in the Eastern Conference.

“We’re right on schedule and on target to put a contender out there,” Marks said. “That’s been the goal all along.”

Brooklyn is still in good position to make the playoffs, coming out of the break in seventh place in the East and five games ahead of ninth-place Washington. The Nets have received strong guard play from Spencer Dinwiddie and Caris LeVert.

Brooklyn is still in good position to make the playoffs, coming out of the break in seventh place in the Eastern Conference and five games ahead of ninth-place Washington.