What the key squares are
For a pawn on its second, third or fourth rank, the key squares are the three squares two ranks in front of it. For the e2 pawn here they are d4, e4 and f4. Once the pawn reaches the fifth rank, the squares directly in front of it count as well: for a pawn on e5 the key squares are d6, e6, f6, d7, e7 and f7.
If your king stands on a key square, the pawn promotes whatever the defender does, provided the defending king cannot simply capture it. So the king goes first and the pawn follows.
The rook's pawn is the exception. Its key squares are on the neighbouring file: g7 and g8 for an h-pawn, b7 and b8 for an a-pawn.
The race in this position
The black king already stands next to d4. White's only winning move is Kf2, which heads for e4 and f4 on the side away from the black king.
The natural Kd2 only draws. After Kd4 the kings face each other with White to move, Black holds the opposition, and the white king cannot get past.
Pushing the pawn does not help either. After e3 or e4 the key squares move up the board, closer to the black king, and the tablebase gives a draw.
Using the opposition
When the defending king guards the key squares, the opposition decides. In the demonstration, after Kf2 Kd4 Kf3 Ke5, White plays Ke3. Now Black must move and give way, and the white king steps onto a key square on the other side.
Remember
- Key squares two ranks ahead
- King first, pawn later
- Go round on the far side
- Use the opposition to break through