Joe NBA Player scores a basket for the wrong team

How is it credited in the box score?

I’ll WAG (since this isn’t GQ).

Probably the last player who possessed the ball on the team that is credited with the points will get awarded the points. CMIIW.

Not credited to the last to touch but opponent nearest. See:

http://nbahoopsonline.com/History/Leagues/NBA/Rules/Scoring.html

which says: d. A field goal accidentally scored in an opponent’s basket shall be added to the opponent’s score, credited to the opposing player nearest the shooter, and shall be mentioned in a footnote.

and somewhat mysteriously: e. A field goal that, in the opinion of the officials, is intentionally scored in the wrong basket shall be disallowed. The ball shall be awarded to the opposing team out-of-bounds at the free throw line extended.

I wonder the reason for e. Why not credit the team with the 2 points. The only thing I can think is to prevent the team from shooting a 3 pointer, and maintain possession, but you already have possession. I’d think there would be other things to do.

I meant to add that this is the NBA rule as requested. The college rule is no one is credited with the basket. In high school the rule used to be when I scored it (way back when) that the team captain was credited with the goal. That may still be the rule, but I don’t know.