In chess, opposition (or direct opposition) is the situation occurring when two kings face each other on a rank or file, with only one square in-between them. In such a situation, the player not having to move is said to "have the opposition" (Flear 2004:12). It is a special type of zugzwang and most often occurs in endgames with only kings and pawns (Flear 2000:36). The side with the move may have to move the king away, potentially allowing the opposing king access to important squares. Taking the opposition is a means to an end (normally forcing the opponent's king to move to a weaker position) and is not always the best thing to do.
There are extensions of direct opposition, such as diagonal opposition and distant opposition, which can be conducive to reaching direct opposition. All three types may be referred to simply as opposition if the type is unambiguous in context.
Direct opposition is a position in which the kings are on the same rank or file and they are separated by one square. When the term opposition is used, it normally refers to direct opposition.
In this diagram, the player whose turn it is not to move has the opposition. If it is Black's turn to move, White has the opposition and wins (Flear 2004:23). (See King and pawn versus king endgame.) If it were White's turn to move, Black would have the opposition and the position would be a draw.
In order to remember how to play situations like in the adjacent diagram - each time the pawn is moved forward, it must be without giving check. If the pawn checks the opponent's king, the opposition is lost and the game is drawn.
In the 1959 game between Svetozar Gligorić and Bobby Fischer, Black can draw by keeping the white king from getting to any of the key squares (marked by dots). This is accomplished by not allowing White to get the opposition, and seizing the opposition if the white king advances.