White plays to get his King in front of the Pawn. The position is then a win, no matter whose move it is.
- Kf7!
Thee is no win after 1. g6+ Kh8, 2. g7+ (2. Kf7 stalemates Black) Kg8, 3. Kg6, and Black is stalemated. Notice that the Pawn check at the seventh rank does not win unless White controls the queening square.
- ... Kh8
- Kg6 Kg8
- Kh6 Kh8
- g6 Kg8
- g7
The winning idea. The Pawn reaches the seventh rank without checking.
- ... Kf7
- Kh7
Seizes control of g8, the Pawn's queening square.
- ... Ke7
- g8=Q
White wins.