Learn

Opposition in chess: how to win king and pawn endgames

For iPhone, iPad, Mac and Android. No account.

In king and pawn endgames, a single tempo often decides between a win and a draw. The opposition is the tool that tells you who has that tempo. This guide explains direct, distant and diagonal opposition, shows when king and pawn against king is a win, how key squares and the rule of the square work, and how triangulation passes the move to your opponent. Every diagram was checked with the Syzygy tablebase, and you can play each one against Stockfish in your browser.

What the opposition is

Two kings can never stand next to each other. When they face each other on the same file or rank with exactly one square between them, neither king can step forward. The side that has to move must give way. The side that does not have to move has the opposition.

  • Direct opposition: the kings stand on the same file or rank with one square between them, for example d5 and d7.
  • Distant opposition: the kings stand on the same file or rank with three or five squares between them. It turns into direct opposition when the kings approach each other.
  • Diagonal opposition: the kings stand on the same diagonal with one square between them, for example e4 and g6. It usually turns into direct opposition with the next move.
Direct opposition. White: king d5, pawn d4. Black: king d7. Black to move loses, because the black king has to give way (tablebase: loss for Black).Play this position against Stockfish

In the diagram, Black must step aside, for example 1...Ke7. Then 2.Kc6 takes the key square, and the pawn promotes. Swap the side to move and the result changes. With White to move it is a draw: after 1.Ke5 Ke7 2.d5 Kd7 3.d6 Kd8, the tablebase shows that each of these black moves is the only one that holds. The defender keeps the opposition by stepping straight back, and White cannot make progress.

Distant opposition. White: king d2, pawn e2. Black: king e6. Black to move draws only with 1...Kd6, taking the distant opposition (tablebase: draw; every other move loses).

The same works for the attacker. With the black king on e5 instead and White to move, only 1.Ke3 wins: White takes the direct opposition, and every other move only draws according to the tablebase.

King and pawn against king: key squares

King and pawn against king is a three-piece endgame, so the tablebase knows the result of every position. You do not need to memorise them. You need one idea: key squares. If the attacking king reaches a key square, White wins no matter who is to move, as long as the black king cannot simply capture the pawn.

  • Pawn on the second, third or fourth rank: the key squares are the three squares two ranks in front of the pawn. For a pawn on e4, these are d6, e6 and f6.
  • Pawn on the fifth rank: the three squares directly in front of the pawn are key squares as well. For a pawn on e5, these are d6, e6 and f6, and also d7, e7 and f7. A king on e6 in front of a pawn on e5 wins with either side to move (tablebase).
  • Rook pawn: the rules do not apply. If the defending king reaches the corner in front of the pawn, the game is a draw.
The white king stands on d6, a key square of the e4 pawn. White wins with either side to move (tablebase: win).Play this position against Stockfish

The technique follows from this: king first, pawn later. Bring your king in front of the pawn and fight for the key squares with the opposition. Push the pawn only when the king has done its job. In the first diagram, after 1...Ke7, the move 2.d5? throws the win away. Only king moves win, for example 2.Kc6.

Rook pawn. White: king g6, pawn h5. Black: king h8. Draw with either side to move (tablebase: draw).

With a rook pawn, the black king in the corner cannot be driven out. White can either push the pawn and give stalemate or leave the king's way open.

The rule of the square

When the attacking king is far away, the question is simpler: can the defending king catch the pawn? Instead of counting moves, draw a square. One side runs from the pawn to its promotion square, and the square extends from there towards the defending king. If the defending king stands inside the square, or can step into it with its move, it catches the pawn.

Rule of the square. The square of the a4 pawn runs from a4 to e4 and e8. White to move wins with 1.a5, Black to move draws with 1...Ke4 or 1...Ke5 (tablebase).Play this position against Stockfish
  • White to move: after 1.a5 the square shrinks to a5 to d8. The black king on f4 cannot step into it, and the pawn promotes.
  • Black to move: 1...Ke4 enters the square, and the king reaches the pawn in time.
  • Pawn on its starting square: because of the double step, draw the square as if the pawn stood one rank higher. With a white pawn on a2 and the black king on g4, Black to move draws with 1...Kf4. With White to move, 1.a4 wins, while 1.a3 only draws (tablebase).

The rule only counts the race between pawn and king. If other pieces or the attacking king can block the defending king, check the position with an engine or the tablebase.

Triangulation: passing the move

Sometimes you reach a position that would win with the opponent to move, but it is your move. The pawns cannot help, because every pawn move changes the position. The solution is triangulation: your king walks around a small triangle of three squares and returns to its starting square, while the defending king can only go back and forth. After three king moves you have the same position with the opponent to move.

Triangulation. White: king d5, pawns b6 and c5. Black: king d7, pawn b7. White to move wins with a king triangle; 1.c6+? only draws (tablebase).Play this position against Stockfish

With Black to move, this position is lost for Black: the king has to leave d7, and the white king gets in front. With White to move, White uses the triangle d5, e5 and d4: 1.Ke5 Kc6 2.Kd4 Kd7 3.Kd5. Now the diagram position is on the board again, but with Black to move. After 3...Kc8 4.Ke6 Kd8 5.Kd6 Kc8 6.Ke7 Kb8 7.Kd7 Ka8 8.c6, White wins. The tablebase confirms the win after every move of this line.

Why can Black not do the same? The white pawns cover c7 and d6, so the black king has fewer squares near its pawn and cannot copy the triangle. Look for triangulation when the defending king has only two useful squares and your king has room for three.

Typical mistakes

  • Pushing the pawn too early. The pawn can only move forward, and every pawn move uses a tempo you may need later. In the first diagram, 2.d5? throws the win away.
  • Stepping aside instead of straight back. As the defender, retreat in front of the pawn. In the drawn line 1.Ke5 Ke7 2.d5 Kd7 3.d6, only 3...Kd8 holds. 3...Kc8? or 3...Ke8? lose.
  • Forgetting the rook pawn. King and rook pawn against king is a draw when the defending king reaches the corner. Do not trade into such an ending and expect to win.
  • Counting the square from the wrong rank. A pawn on its starting square can move two squares. Draw the square from the next rank.
  • Taking the opposition at the wrong moment. The opposition is a tool to reach key squares. If your king is already on a key square, you do not need it.

A practice plan

  1. Step 1

    Play the first diagram as White against the Grandmaster level on the play against Stockfish page. Then switch the side to move in the board editor, defend the same position as Black and see how the result changes.

  2. Step 2

    Set up a king and pawn against king position with the pawn on e2, put your king next to it and find the key squares before you move.

  3. Step 3

    Practise the rule of the square with the diagram above: first win as White, then defend as Black.

  4. Step 4

    Play the triangulation diagram until you can pass the move without thinking.

  5. Step 5

    Finish with rook endgames: the Lucena position and the Philidor position often end in king and pawn endgames after a rook trade.

Good to know

Questions and answers

What is the opposition in chess?

A position where the two kings face each other with one square between them. The side that does not have to move has the opposition, because the other king must give way.

What are key squares?

Squares that guarantee the win in king and pawn against king when the attacking king reaches them. For a pawn up to the fourth rank, they are the three squares two ranks in front of the pawn.

How does the rule of the square work?

Draw a square from the pawn to its promotion square. If the defending king is inside it, or can step into it with its move, it catches the pawn.

What is triangulation in chess?

A king manoeuvre over three squares that reaches the same position with the opponent to move. It works when the opponent's king has only two squares to shuttle between.

Is king and rook pawn against king a draw?

Yes, when the defending king reaches the corner in front of the pawn. The attacking king cannot drive it out without giving stalemate.

More guides

Continue with

ChessWOW

Win the endgames you reach.

Scan endgame diagrams, check them with the tablebase and play them against Stockfish in the ChessWOW app.