Opposition in Chess: The Key to King and Pawn Endgames

Opposition in chess is when the kings face each other with one square between them and the side to move must give way. Learn direct and distant opposition with verified positions.

Opposition in chess is a standoff between the two kings: they stand on the same file, rank or diagonal with one square between them, and the player who must move has to step aside. The side that is not to move has the opposition. Kings can never touch, so the king that gives way lets the other king pass. In king and pawn endgames, that single tempo decides whether a pawn promotes or the game is drawn.

Direct opposition, step by step

This is the position every player must know. White's king stands in front of its pawn, and the kings face each other on the e-file with one square, e6, between them.

8/4k3/8/4K3/4P3/8/8/8 w - - 0 1

Open this position with White to move → · Play it against the computer →

With White to move, it is a draw. White has exactly four legal moves (Kd4, Kd5, Kf4, Kf5) and every one of them draws. The king cannot advance, because d6, e6 and f6 are all covered by Black's king. Stockfish 17.1 at depth 30 gives 0.00.

With Black to move, White wins. Same pieces, but now Black has the move and must give way.

8/4k3/8/4K3/4P3/8/8/8 b - - 0 1

Open this position with Black to move →

Black has five legal moves, and all five lose. After 1...Kd7 2.Kf6, White's king slips past to the side (this is called outflanking), and Stockfish 17.1 at depth 30 finds mate in 19. Nothing about the position changed except whose turn it is. That is the opposition.

Who has the opposition?

Count the squares between the kings on a shared file or rank. If the number is odd (1, 3 or 5) and it is your opponent's turn, you have the opposition. With one square between the kings it is direct opposition. With three or five squares it is distant opposition. Kings on the same diagonal with one square between them are in diagonal opposition, which works the same way.

When does the opposition decide the game?

We solved every legal king and pawn vs king position exactly with our own retrograde solver (165,676 positions with the pawn on the a- to d-file; the e- to h-files are mirror images), then cross-checked 40 random positions against Stockfish 17.1, which agreed on all 40. Here we kept only positions where the kings stand in direct opposition on the pawn's file, with White's king ahead of its pawn.

White wins in direct opposition, by who is to move (exact results)
Where White's king standsWhite to moveBlack to move
Right in front of the pawn, on the 3rd to 5th rank (b- to g-pawn)0 of 1818 of 18
Two or more squares in front of the pawn, below the 6th rank (b- to g-pawn)18 of 1818 of 18
On the 6th rank, ahead of the pawn (b- to g-pawn)24 of 2424 of 24
Any square ahead of a rook pawn (a- or h-pawn)0 of 200 of 20

Method: each position was solved to the end by working backwards from promotion, capture and stalemate, so these are exact results, not engine estimates. The first row is the whole story of the opposition: with the king right in front of its pawn, the move decides everything. In the second row White wins anyway, because a spare pawn move hands the move back to Black. On the 6th rank the opposition no longer matters, and with a rook pawn it cannot help.

Distant opposition: win the race from far away

The opposition also works from a distance. Here the kings are far apart, and White has ten legal moves.

8/4k3/8/8/8/8/2P2K2/8 w - - 0 1

Open the distant-opposition position →

Only 1.Ke3! wins. It puts the kings on the e-file with three squares (e4, e5, e6) between them, and Black is to move: White has the distant opposition. Our solver confirms that the other nine moves, including both pawn pushes, all draw. Stockfish 17.1 at depth 30 also chooses 1.Ke3 (+13.1). Whatever Black does next, White keeps the opposition as the kings come closer, then outflanks and escorts the pawn.

How to use the opposition

  1. Get your king in front of your pawn. A king behind its pawn cannot take the opposition in a useful place.
  2. Line up the kings with an odd number of squares between them, with your opponent to move.
  3. Keep it as the kings approach. When your opponent steps sideways, step forward on the same side to keep facing them. When they step back, step forward to match.
  4. Outflank. Once the defending king must give way, move your king to the side and forward onto a key square, then push the pawn. The king and pawn endgame lesson shows which squares those are.

And the defensive view: as the defender, stay in front of the pawn and take the opposition yourself whenever your opponent's king comes close. If you lose it, you lose the game.

When the opposition does not work

A rook pawn is the big exception. Here White's king faces Black's king across the a-file, and Black is in the corner.

k7/8/K7/P7/8/8/8/8 w - - 0 1

Open the rook-pawn position →

White has exactly two legal moves, Kb5 and Kb6, and both draw (Stockfish 17.1: 0.00). There is no square beside the a-file on the left to outflank through, and if White pushes the pawn to a7 the defender is stalemated or simply shuffles between a8 and b8. That is why the table above shows 0 wins for rook pawns.

Practice: Pawn endgame

All 21 pawn endgame puzzles →

Puzzle 1 of 12

Black to move
Loading chessboard…
Find the strongest move.

Frequently asked questions

What is the opposition rule?

When the two kings stand on the same file or rank with an odd number of squares between them, the player who is not to move has the opposition and the other king must give way. In king and pawn endgames the stronger side uses this to get its king past the defender.

Who has the opposition?

The player whose opponent is to move, as long as the squares between the kings add up to an odd number. In the first position above, White has the opposition with Black to move, and Black has it with White to move.

What is distant opposition?

The same idea with three or five squares between the kings. Taking the distant opposition early, like 1.Ke3 in the example above, means you keep the direct opposition when the kings meet.

Is the opposition the same as zugzwang?

The opposition is a special case of zugzwang: the side to move would like to pass but cannot, because any king move gives ground. See king and rook checkmate for the same idea used to drive a king to the edge.

Practice the idea on the pawn endgame puzzles, test any position on the analysis board, and read what is a stalemate in chess to avoid throwing a won ending away. Next up: the Lucena position, the Philidor position, and mixed endgame practice.