A penalty in basketball in which a player or coach is immediately removed from the game as a result of one of a few serious offenses. Players may be ejected for only a few offenses, which include the accumulation of two technical fouls, fighting, unsportsmanlike conduct, and violent fouls. A referee or game official is the one who makes the decision, and it is made at his discretion-except in the case of two technical fouls, which requires an automatic ejection in the NBA (though technical fouls are often, to an extent, at the discretion of referees as well). Coaches may be ejected as well, and referees have much more discretion in doing so. As with players, any coach who accumulates two technical fouls will be ejected. Players or coaches who are ejected must leave the court.
The ejection rule has been a part of basketball for a very long time. Its effectiveness and frequency of use has shifted as the game has changed over the years, and in the modern age, referees will not hesitate to eject a player or coach for abusive behavior on the court. Since basketball players and fans exist in such close quarters during a game (compared to other professional sports), security is of the utmost concern, and keeping the games controlled, with little violence, is a priority for the NBA. It has also helped improve TV ratings, which has helped the game in other ways.