Home › News › Castling: the rights that are lost, and why an attacked f1 blocks O-O

Castling: the rights that are lost, and why an attacked f1 blocks O-O

Published · By TG, the site operator

Castling is the only move in which the king and a rook move together. The Laws of Chess count it as a single move of the king, and it is one of the two ways a king can move, next to stepping onto an adjoining square. Article 3.8.2 sets out when it is allowed.

Rights that are lost for good

The right to castle is lost once the king has moved, and separately once the rook involved has moved. It does not come back if the piece returns to its starting square. A king that steps to f1 and back to e1 can no longer castle, and neither can a rook that leaves h1 and returns. Each side keeps its own two rights, one on each wing.

Conditions checked on every move

Castling is temporarily prevented in two cases. The first is an attack: the king's square, the square it must cross and the square it lands on may not be attacked by one of the opponent's pieces. The second is blocking: no piece may stand between the king and the rook being used. The rule only tests the king's squares, so an attack on the rook's own square or path does not stop the move.

An example with an attacked f1

Take White's king on e1 and rook on h1, with Black's rook on f8 and king on h8. Neither White piece has moved, and the squares f2 to f7 are empty. The king is not in check and f1 and g1 are empty, yet the f-file rook attacks f1. So the king may not cross f1, and e1 to g1 is illegal. A legal-move generator that checks only the destination square would get this wrong. Setting up the position as the FEN 5r1k/8/8/8/8/8/8/4K2R w K - 0 1 shows it: White has the right to castle on the king side, but the move does not exist.

The board's move generator applies the same tests. Its castling code checks the empty squares and the attacked squares on the king's path, and it removes a right when the king or that rook moves, or when a rook is captured on its home square.

Play a game and watch for the first castling move →

Touching a king and a rook

Article 4.4 covers the case where a player touches the king and then a rook. If castling on that side is legal, the player must castle. If the player touches the rook first and then the king, castling with that rook is not allowed. These rules govern moves made by hand at the board.

Practice idea

Before each move in a game, ask two questions about your king: is it attacked on its current square, and is the square it would cross attacked? A rook that has never moved is not enough on its own.

Sources

Written by the operator of this site from the sources listed above. Spotted a mistake? Email [email protected] and it will be corrected.

All chess news · Play chess now