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