Pawn endings
Key squares change as the pawn advances
For a non-rook pawn on its fifth rank, the key squares expand to the three immediately ahead and the three one rank farther.
Worked example
Position in text
White to move. White: king c5, pawn e5. Black: king f7.
FEN: 8/5k2/8/2K1P3/8/8/8/8 w - - 0 1
Kd6 enters d6, one of the key squares for an e5-pawn. A king on d6 is now ahead of the pawn by only one rank, yet can force promotion against the bare king with accurate play.
A plausible mistake
Do not insist on aiming two ranks ahead after the pawn advances to the fifth. The closer entry may already be enough.
Try it yourself
Position in text
White to move. White: king f6, pawn g5. Black: king g8.
FEN: 6k1/8/5K2/6P1/8/8/8/8 w - - 0 1
Is f6 already a key square for the g5-pawn, or must the king reach f7?
Check your answer
f6 is already in the key-square set: f6, g6, h6, f7, g7 and h7. The added sixth-rank entries are why a king one rank ahead can be enough.