|In chess, the threefold repetition rule states that a player can claim a draw if the same position occurs three times, or will occur after their next move, with the same player to move, and with each player having the same set of legal moves each time, including the right to take en passant and the right to castle. The game is not automatically drawn if this happens: one of the players, on their move, must claim the draw with the arbiter.|
The relevant rule in the FIDE laws of chess is 9.2, which reads:
- The game is drawn, upon a correct claim by the player having the move, when the same position, for at least the third time (not necessarily by sequential repetition of moves)
- a. is about to appear, if he first writes his move on his scoresheet and declares to the arbiter his intention to make this move, or
- b. has just appeared, and the player claiming the draw has the move.
- Positions as in (a) and (b) are considered the same, if the same player has the move, pieces of the same kind and colour occupy the same squares, and the possible moves of all the pieces of both players are the same.
- Positions are not the same if a pawn that could have been captured en passant can no longer be captured or if the right to castle has been changed temporarily or permanently.
While the rule does not require that the position occur thrice on consecutive moves, it happens this way very often in practice, typically with one of the kings being put into perpetual check.
The clause about the right to take en passant and the right to castle is a subtle but important one. In a game between grandmasters Anatoly Karpov and Anthony Miles, Karpov, with less than five minutes on his clock, claimed a draw by repetition after checking his scoresheet carefully, whereupon Miles gleefully pointed out to the arbiter that in the first occurrence of position, Karpovīs king had had the right to castle, whereas in the second and third it had not. Tournament rules stipulated that a player be penalized with three minutes of their time for incorrect claims, which left Karpovīs flag on the verge of falling! By now, Miles had had his fun, and took the draw.