King and pawn versus king endgame

The chess endgame with a king and a pawn versus a king is one of the most important and fundamental endgames, other than the basic checkmates. It is an important endgame for chess players to master, since most other endgames have the potential of reducing to this type of endgame via exchanges of pieces. Players need to be able to determine quickly whether a given position is a win or a draw, and to know the technique for playing it. The crux of this endgame is whether or not the pawn can be promoted (or ), so checkmate can be forced.

In the first paragraph of one of his books on endgames, Peter Griffiths emphasized the importance of this endgame:

"There is simply no substitute to a clear understanding of when and how these positions are won or drawn, not only so that one can play them accurately, but in order to recognize in advance what the correct result should be. If you can do that, you can exchange off quite confidently from a more complex position."

In the positions in which the pawn wins, at most nineteen moves are required to promote the pawn (with optimal play) and at most nine more moves to checkmate, assuming that the pawn was promoted to a queen.

Except for the section on defending and some actual games, it will be assumed that White has a king and pawn and Black has a lone king. In general, Black should place their king in the path of the pawn to try to prevent its promotion.

Rule of the square
The most basic rule applies when the pawn can queen unassisted by its king. The rule of the square determines if this is possible. In this position, the pawn is on the fifth square from the queening square (counting the queening square itself). A square of 5×5 squares with the queening square in one corner and the pawn in an adjacent corner can be imagined. (An easy method is to construct the square with a diagonal from the pawn to the last rank.) If the black king can move into this square, he can catch the pawn, otherwise the pawn wins the race.

In this position, if it is Black's move, he can move ...Kb4 and enter the square, catching the pawn. If it is White's move, the pawn advances, the square shrinks to 4×4, and the king cannot move into the square, so the pawn queens. (See Wikibooks – Chess/The Endgame for further discussion on the rule of the square.)

Even if the defending king can move inside the square of the pawn, the attacking king may be able to block it, as in the diagram from Fishbein.
 * 1... Ke4

Moving into the square.
 * 2. Kb4 Kd5 3. Kb5! Kd6 4. Kb6! Kd7 5. Kb7! Kd6 6. a5 Kc5 7. a6 Kb5 8. a7

and the pawn promotes.

Note that in some cases, the king can catch a pawn when he is outside the square by creating threats that must be parried, and gain a tempo. In the Réti endgame study (by Richard Réti, 1921), the white king is outside the square of the black pawn, two tempi short of catching the pawn. However, White can draw by "going after two birds at once".


 * 1. Kg7! h4 2. Kf6! Kb6

If 2...h3 then 3.Ke7 or 3.Ke6 and the pawns promote together.
 * 3. Ke5! Kxc6

If 3...h3 then 4.Kd6 h2 5.c7, draw.
 * 4. Kf4, resulting in a draw.

Key squares
If the defending king is within the "square", then the pawn cannot queen without the help of its own king. The first concept that needs to be introduced is that of the key square, also known as a critical square. A key square is a square such that if White's king occupies it, White can force the pawn to promotion, regardless of where the black king is and regardless of which side is to move, and against any defense (assuming that the black king cannot capture the pawn). The key squares are relative to the position of the pawn. Whether or not the white king can reach a key square depends on the position of the pieces. Of course, even if the white king occupies a key square, accurate play is still required in order to promote the pawn.

Note that the key square is in front of the pawn. Endgame expert Yuri Averbakh said, just as a father leads his child across the road rather than pushing the child in front, the king should also lead the pawn to the queening square.

Rook pawn
A rook pawn (on the a- or h-file) has much less chance of promoting than other pawns. The reason is that if the opposing king can get to any square in front of the pawn, it cannot be driven away from the file, and the pawn cannot queen. Black can always draw if he can reach the c8-square for an a-pawn (pawn on the a-file), or the equivalent f8 for an h-pawn, except for the position in the next diagram, with White to move. Therefore, an advanced rook pawn generally has two key squares: b7 and b8 for an a-pawn, and g7 and g8 for an h-pawn. The key squares are indicated by the black dots in the position in the diagram.

If White's king can reach either of the two key squares, he can keep Black's king away and the pawn will promote. If the Black king can reach any of the squares marked with a dot or a cross, it stops the pawn.

The pawn can also promote in the position on the right (if White is to move), after
 * 1. h7

However, in practice most of the time the black king can stop a rook pawn because it is usually close enough that the white king cannot prevent it from getting in front of the pawn (or capturing it).

Examples from games
The game Oscar Panno–Miguel Najdorf, Buenos Aires 1968, continued
 * 59. Kg4 Kc7 60. Kg5

and White won because the white king can reach the key square g7. Black resigned in light of
 * 60... Kd7 61. Kg6 Ke7

If 61...Ke6, then 62.h4; not 62.Kg7 because 62...Kf5! wins the pawn.
 * 62. Kg7

Moving to a key square, the only move to win.
 * 62... Ke6 63. h4 Kf5 64. h5

The only move to win. The king protects the pawn as it promotes.

If Black was to move in this position, he would draw by reaching the f8-square and preventing the white king from getting to a key square, and the pawn cannot promote.

This position from a game between Gedeon Barcza and future world champion Bobby Fischer was a draw. (White's 96.Kd2 followed by 97.Kc1 draws.)

Pawns other than rook pawns
Pawns other than rook pawns have a much better chance of promoting. If the pawn is on the second, third, or fourth, there are three key squares – the square two squares in front of the pawn and the squares to the left and right of that square. The key squares are indicated by the black dots, for example see the diagram on the left. If the pawn is on the fifth or sixth rank, there are six key squares: the square in front of the pawn and the squares to the left and right, as well as the square two squares in front of the pawn, and the squares to the left and right of it, see the diagram in the middle. When the pawn is on the seventh rank, the key squares are the squares on the seventh and eighth rank that touch the pawn's square (see the diagram on the right).

An easy way to remember the key squares is to note that if the pawn is not beyond the midpoint of the board, there are three key squares that are two ranks ahead. If the pawn is on the fifth or sixth rank there are six key squares on the two ranks in front of the pawn. If the pawn is on the seventh rank, the adjoining squares on the seventh and eighth ranks are key squares.

Once White's king occupies a key square he can keep the opposing king from blocking the advance of the pawn, as will be shown below.

Knight pawn exception
There is an exception to the key squares rule with a knight pawn, the black king in the corner, and Black to move. In the diagram on the right, with the white king on either the square indicated or the square marked by a cross, the position is stalemate if Black is to move. This is sometimes known as the b- (or g-) pawn trap.

In this position, the best move is 1.Kh6! If
 * 1. Kf6 Kh7

Now if 2.g6+ then 2...Kh8! draws, or
 * 2. Kf7 Kh8

does not work for White because 3.g6?? is stalemate. White must play
 * 3. Kg6 Kg8

getting back to the original position, followed by 4.Kh6.

This position and sequence of moves came up in a game between Harry Golombek and Arturo Pomar. It is actually much older, having first appeared in Giambattista Lolli's 1763 book.

Any key square by any route
It is important that White wins if he gets his king to any key square and the path to a key square is not always direct. For instance, in the diagram, the key squares for White are b5, c5, and d5; however, Black can prevent the white king from reaching a key square directly. For example:
 * 1. Kd2 Ke7 2. Kd3 Kd7 3. Kc4 Kc6

taking the opposition (see below).

However, the white king can reach a key square (b5) by going on the other side of the pawn:
 * 1. Kc2! Ke7 2. Kb3 Kd6 3. Kb4 Kc6 4. Kc4

Opposition, and Black is in zugzwang.
 * 4...Kd6 5. Kb5

or
 * 4... Kb6 5. Kd5

and the white king has occupied a key square and has a winning position.

Opposition
The second concept needed is opposition – when two kings face each other with only one square in between, the side with the move may have to move the king away and allow the opposing king to advance. The other king has the opposition.

However, Averbakh pointed out that the opposition is a means to an end; the end is penetration to a key square. If you can penetrate without the opposition, then do so. In this diagram, White should seize a key square by playing:


 * 1. Kc5

and moving to a key square on the next move (e.g. 1...Kd7 2.Kb6). Taking the opposition by 1.Ke4 draws (as do any other moves).

Rules
If the pawn is not a rook pawn some rules apply:


 * Rule 1: With one exception, if the black king can get to the square in front of the pawn, or the square in front of that (which are key squares), he draws.

The reason is that if the black king alternates between those two squares, he can keep the white king from getting to a key square. The exception is the position in the diagram, and only if White is to move, because of
 * 1. d7 Ke7

Black was in zugzwang.
 * 2. Kc7

followed by
 * 3. d8=Q

Otherwise, if the black king stays on one of those two squares, he keeps the white king from occupying a key square.


 * Rule 2: White wins if at least any two of the following conditions are met:
 * (a) the white king is in front of the pawn
 * (b) white has the opposition
 * (c) the white king is on the sixth rank.

In positions in which fewer than two of the conditions are met, it may or may not be possible to get to a position meeting at least two of the conditions, depending on the position of the pieces and who is to move. In such positions, if the attacker can get to a position that meets two conditions, he wins. On the other hand, the defender may be able to prevent the attacker from getting to such a position (see Defending drawn positions). Recall that rule 1 above gives a condition which draws for Black.

There are three cases to be considered. In any of these three cases, the white king is able to force his way onto a key square and thus reach a winning position. Accurate play from that position is still needed to win the game.

Case 1, conditions (b) and (c) are met
Conditions (b) and (c) are met in this diagram, if it is Black's move. Black cannot prevent the white king from reaching the key square d7.
 * 1... Ke8 2. e7 Kf7

Black was in zugzwang.
 * 3. Kd7 (a key square)

followed by
 * 4. e8=Q

and White wins.

This position illustrates an important rule of thumb: If the White king is on its sixth rank, the pawn must be advanced to the seventh rank without giving check. (If White's king is on the sixth rank and the pawn checks the Black king when it advances to the seventh rank, the black king can move in front of the pawn, resulting in a draw. In that case White has to either give up the pawn or move the king behind the pawn into stalemate.)

Case 2, conditions (a) and (c) are met
Conditions (a) and (c) are met in this diagram, with either side to move.

If it is Black's move in this diagram, the game could go
 * 1... Kg8 2. Kh6 Kh8

Black was in zugzwang.
 * 3. g6 Kg8 4. g7 Kf7 5. Kh7

and White wins because the pawn advanced to the seventh rank without giving check, as in the position in the diagram in the previous section.

If it is White's move in this diagram,
 * 1. Kf7 (a key square)

and Black cannot prevent the pawn from queening.

White must take a little more care with a knight pawn. If White moves 1.Kf6, Black can reply 1...Kh7 and White must back up with 2.Kf7 Kh8 and proceed as above, because 2.g6+? Kh8! 3.Kf7 is stalemate.

Case 3, conditions (a) and (b) are met
Conditions (a) and (b) are met in this diagram, if Black is to move. The game could continue
 * 1... Kd6 2. Kf5 Kd7 3. Kf6 Kd8 4. e4 Kd7 5. e5 Ke8 6. Ke6

White takes the opposition. White's king has reached the sixth rank before the pawn; 6.e6?? Kf8 draws.
 * 6... Kd8 7. Kf7

and White wins. There are several other variations, depending on Black's moves.

Example from Maróczy vs. Marshall
In this example from Géza Maróczy–Frank Marshall, Monte Carlo 1903, Black to move gets the king in front of the pawn with the opposition:
 * 1... Kg4! 2. Kh2 Kf3 3. Kh3 g4+ 4. Kh2 Kf2! 5. Kh1 Kg3 6. Kg1 Kh3!

and the game could continue:
 * 7. Kh1 g3 8. Kg1 g2 .

Case 4, all three conditions are met
Of course, the ideal situation is when all three conditions are met. In this diagram, if Black is to move all three conditions are met and White wins easily:
 * 1... Kd8 2. Kb7

and the pawn will promote (e.g. 2...Kd7 3.c6+ followed by 4.c7 and 5.c8).

If White is to move in this position, then conditions (a) and (c) are met, so White wins:
 * 1. Kd6 Kd8 2. c6 Kc8 3. c7 Kb7 4. Kd7

etc., as above.

This emphasizes the importance of getting the king to the sixth rank in front of the pawn. If this configuration is achieved, White wins no matter which side is to move.

Exception – rook pawn
For a rook pawn, it is possible for Black to draw even if all three conditions are met. In the diagram, all three conditions are satisfied (opposition is satisfied if it is Black's turn) but it is a draw no matter whose move it is.

If it is Black to move:
 * 1... Kb8 2. Kb6 Ka8 3. a6 Kb8 4. a7+ Ka8

leads to either stalemate or White giving up the pawn. Or if
 * 1... Kb8 2. Kb5 Ka8 3. Kb6 Kb8 4. a6 Ka8

leads to a draw. If it is White to move:
 * 1. Kb6 Kb8 2. a6 Ka8 3. a7 

is stalemate. Or:
 * 1. Kb6 Kb8 2. Kb5 Ka8 3. Kb6 Kb8 4. a6 Ka8

leads to either White giving up the pawn or stalemate.

In both cases with White to move or Black to move, all Black needs to do is shuffle between a8 and b8 and White's king can never reach the key square b7 or b8.

In the second diagram, it is again a draw no matter whose turn it is.

If it is White's turn:
 * 1. Kh8 Kf8 2. h7 Kf7

and this time it is White who is stalemated. If it is Black's turn:
 * 1...Kf8 2. Kg6 Kg8

and the position in the previous diagram is reached which is a draw no matter who is to play.

Defending drawn positions
Now consider defending positions when only one of the conditions of Rule 2 is met, which is not sufficient to win if the defender is able to prevent the attacker from getting a position that meets at least two of the conditions.

The king is in front of the pawn
If the king is in front of the pawn and neither of the other two conditions is met, the defense is easy.

In this diagram, with White to move, Black's king is in front of the pawn, but it is not on its sixth rank and it does not have the opposition. White draws by
 * 1. Kb2

taking the opposition and preventing the black king from getting the opposition or advancing to its sixth rank. (Indeed, this is the only move that draws. Sometimes this position is reached after Black has captured a pawn.  To draw, White must be in a position to move their king to take this direct opposition.)  Then if the black king steps to the side, White simply maintains the opposition:
 * 1... Kc4 2. Kc2

If the pawn now advances, White gets to a drawn position by moving in front of the pawn. (Recall that if the opposing king is on the square in front of the pawn or the square in front of that, the position is a draw, with one exception.)
 * 2... b4 3. Kb2 (next diagram)

Note that 3.Kb1 would lose to 3...Kb3 because Black now has satisfied all three conditions of rule 2.

Black to move cannot make any progress from this position; the white king simply stays on b2 or b3, unless Black advances the pawn again, in which case the king moves between b1 and b2. Black cannot disrupt this without stalemate, for instance 3...b3 4.Kb1 Kc3 5.Kc1 b2+ 6.Kb1 Kb3 stalemate.

The king has the opposition
In this diagram, with White to move Black's king has the opposition, but neither of the other conditions. White to move simply moves
 * 1. Kd2

and black cannot promote the pawn, for example:
 * 1... d3 2. Kd1

The defending king must drop back vertically.
 * 2... Ke3 3. Ke1 d2+ 4. Kd1

and now the king must either move away from the pawn and allow it to be captured or play 4...Kd3 and deliver stalemate.

The king is on the sixth rank
In this diagram, the black king is on its sixth rank, but with Black to move it does not have the opposition. If the Black king moves, the white king simply goes to d2 (best) or d1. If the pawn advances to d2, the white king moves to d1, and a draw results as above.

A player should be familiar with both the attacking and defending roles, since a wrong move by the defender may allow the attacker to get to a winning position and a wrong move by the attacker may give up one of the conditions of rule 2, resulting in a draw.

Example from Gligorić versus Fischer
In the game Svetozar Gligorić–Bobby Fischer, Yugoslavia 1959, White can get the king in front of the pawn, but he does not have the opposition and is not on the sixth rank. Black must make sure that White does not get the opposition or get the king to the sixth rank:
 * 1... Kb8!

Any move by Black to the seventh rank loses because White can take the opposition and reach a key square. (The move 1...Kd8 allows the white king to reach the key square a6.) After 1...Kb8, Black draws by taking the opposition if the white king advances, e.g. 2.Kc5 Kc7! draws or 2.Kb5 Kb7! draws.

Guidelines
Edmar Mednis gave these guidelines:
 * The rook pawn is the worst pawn to have. The defending king draws if it can get in front of the pawn or reach the square diagonally adjacent to the promotion square.
 * For other pawns, the position on the right is the key position. White to move draws; Black to move loses (rule 2, parts b and c above).
 * It is always an advantage to have the opposition.
 * If the attacking king is on the sixth rank in front of the pawn it always wins (rule 2, parts a and c).
 * It is always an advantage to have the king in front of its pawn. Otherwise, the key is whether or not the king can get in front of the pawn in an advantageous position.
 * If the attacking king is on the third, fourth, or fifth rank in front of the pawn he wins if he has the opposition (rule 2, parts a and b).
 * A king and doubled pawns (except rook pawns) win in all normal circumstances. The extra pawn is used only to make a tempo move to gain the opposition (which it can not do if the pawns are on adjacent ranks).

Examples
With Black to move, White wins by first occupying a key square and then by getting two of the conditions above:
 * 1... Kb5 2. Kd4 (key square) Kc6 3. Kc4 (opposition) Kb6 4. Kd5 (turning maneuver) Kc7 5. Kc5 (opposition) Kd7 6. Kb6

The white king is on the sixth rank (condition c) ahead of the pawn (condition a) and White can advance the pawn.

If White is to move, Black draws:
 * 1. Kb3 Kb5 (opposition) 2. c4+ Kc5 3. Kc3 Kc6

Alternatives 3...Kd6 and 3...Kb6 also draw.
 * 4. Kd4 Kd6 5. c5+ Kd7 6. Kd5 Kc7 7. c6 Kc8!

If 7...Kd8 then 8.Kd6, taking the opposition, wins.
 * 8. Kd6 Kd8!

and Black draws.

Kamsky vs. Kramnik
This position from Gata Kamsky–Vladimir Kramnik, Nice 2009, was reached after the exchange of rooks in a rook and pawn versus rook endgame. Black draws easily:


 * 125... Ke7

Ke8 also draws.
 * 126. Kd5 Ke8 127. Kd6 Kd8

Taking the opposition.
 * 128. e7+ Ke8 129. Ke6 stalemate.