Initial positions of kings and rooks. Kings may castle to the indicated squares.
a
b
c
d
e
f
g
h
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
a
b
c
d
e
f
g
h
White has castled kingside; Black has castled queenside.
Castling is a move inchess. It consists of moving theking two squares toward arook on the samerank and then moving the rook to the square that the king passed over.[2] Castling is permitted only if neither the king nor the rook has previously moved; the squares between the king and the rook are vacant; and the king does not leave, cross over, or finish on a square attacked by an enemy piece. Castling is the only move in chess in which two pieces are moved at once.[3]
Castling with theking's rook is calledkingside castling, and castling with thequeen's rook is calledqueenside castling. In bothalgebraic anddescriptive notations, castling kingside is written as 0-0 and castling queenside as 0-0-0.
Castling originates from theking's leap, a two-square king move added to European chess between the 14th and 15th centuries, and took on its present form in the 17th century. Local variations in castling rules were common, however, persisting in Italy until the late 19th century. Castling does not exist in Asian games of the chess family, such asshogi,xiangqi, andjanggi, but it commonly appears invariants of Western chess.
During castling, the king is shifted two squares toward a rook of the same color on the same rank, and the rook is transferred to the square crossed by the king. There are two forms of castling:[4]
Castlingkingside (short castling) consists of moving the king to g1 and the rook to f1 for White, or moving the king to g8 and the rook to f8 for Black.
Castlingqueenside (long castling) consists of moving the king to c1 and the rook to d1 for White, or moving the king to c8 and the rook to d8 for Black.
The king does not pass through or finish on a square that is attacked by an enemy piece.
Conditions 3 and 4 can be summarized by themnemonic:A player may not castle out of, through, or into check.
Castling rules often cause confusion, even occasionally among high-level players.[6]Alexander Beliavsky andViktor Korchnoi both had to consult the arbiter during tournaments on whether castling was legal when the rook was on or passed over an attacked square,Yuri Averbakh once mistakenly thought that Black queenside castling was illegal when b8 was attacked, andNigel Short once attempted to castle queenside as Black when d8 was under attack (this was not allowed). Illegal castling has also occasionally occurred in serious games between top players (includingGata Kamsky, Viktor Korchnoi, andRichard Réti) when they forgot that the king or rook had previously moved and returned to its home square, and has not always been noticed by the opponent.Yasser Seirawan once accidentally castled queenside as White with his queen's rook on b1 (which was not allowed), andAlexander Alekhine once "castled his queen" (moving his queen from d1 to b1 and his rook from a1 to c1, which was also not allowed).[7] To clarify:
The rook can be under attack.
The rook can pass through an attacked square. (White can castle queenside even if Black is attacking b1; Black can castle queenside even if White is attacking b8.)
The king can have been in check earlier in the game.
Under FIDE rules and USCF rules, and enforced in mosttournaments, castling is considered a king move, so the king must be touched first; if the rook is touched first, a rook move must be played instead. As usual, the player may choose another legal destination square for the king until releasing it. When the two-square king move is completed, however, the player is committed to castling if it is legal, and the rook must be moved accordingly. The entire move must be completed with one hand. A player who attempts to castle illegally must return the king and rook to their original squares and then make a legal king move if possible (which may include castling on the other side). If there is no legal king move, the touch-move rule does not apply to the rook.[8][9]
These tournament rules are not commonly enforced ininformal play nor commonly known by casual players.[10]
An unmoved king hascastling rights with an unmoved rook of the same color on the same rank, even if castling is not legal in that particular position. In the context ofthreefold and fivefold repetition, two otherwise identical positions with different castling rights are considered to be different positions.
With his 26th move, Karpov attempted to claim a draw by threefold repetition, thinking that the positions after his 22nd, 24th, and 26th moves were the same. It was pointed out to him, however, that the position after his 22nd move had different castling rights than the positions after his 24th and 26th moves (the rook being unmoved prior to 22. ... Ra4, meaning Black still had castling rights in that position), rendering his claim illegal. As a result, Karpov was penalized five minutes on his clock. After thinking for about ten minutes, Miles decided toagree to a draw anyway (even an incorrect claim of threefold repetition is also a draw offer).[7]
Bothalgebraic notation anddescriptive notation indicate kingside castling as 0-0 and queenside castling as 0-0-0 (using the digit zero).Portable Game Notation and some publications use O-O for kingside castling and O-O-O for queenside castling (using the letter O) instead.ICCF numeric notation indicates castling based on the starting and ending squares of the king; thus, castling kingside is written as 5171 for White and 5878 for Black, and castling queenside is written as 5131 for White and 5838 for Black.
Castling under medieval rules. Symbol color corresponds to king color. Circles represent English, Spanish, French, and Lombardy movement; crosses represent Lombardy movement only.
Castling has its roots in theking's leap. There were two forms of the leap: the king would move once like aknight, or the king would move two squares on its first move. The knight move might be used early in the game to get the king to safety or later in the game to escape a threat. This second form wasplayed in Europe as early as the 13th century. In North Africa, the king was transferred to a safe square by a two-move procedure: the king moved to the player's secondrank, and the rook and king moved to each other's original squares.[12]
Various forms of castling were developed due to the spread of rulesets during the 15th and 16th centuries which increased the power of thequeen andbishop, allowing these pieces to attack from a distance and from both sides of the board, thus increasing the importance of king safety.[13]
The rule of castling has varied by location and time. In medieval England, Spain, and France, the white king was allowed to jump to c1, c2, d3, e3, f3, or g1[14] if no capture was made and the king was not in check and did not move over check; the black king might move analogously. In Lombardy, the white king might also jump to a2, b1, or h1, with corresponding squares applying to the black king. Later, in Germany and Italy, the rule was changed such that the king move was accompanied by apawn move.
In theGöttingen manuscript (c. 1500) and a game published byLuis Ramírez de Lucena in 1498, castling consisted of moving the rook and then moving the king on separate moves.
The current version of castling was established in France in 1620 and in England in 1640.[15] It served to combine the rook's move and the king's jumping move into a single move.[16]
In Rome, from the early 17th century until the late 19th century, the rook might be placed on any square up to and including the king's square, and the king might be moved to any square on the other side of the rook. This was calledfree castling.
In the 1811 edition of his chess treatise,Johann Allgaier introduced the 0-0 notation. He differentiated between 0-0r (right) and 0-0l (left). The 0-0-0 notation for queenside castling was introduced in 1837 byAaron Alexandre.[17] The practice was adopted in the first edition (1843) of the influentialHandbuch des Schachspiels and soon became standard. In Englishdescriptive notation, the word "Castles" was originally spelled out, adding "K's R" or "Q's R" if disambiguation was needed; eventually, the 0-0 and 0-0-0 notation was borrowed from the algebraic system.
Position after 10.0-0-0: Opposite castling in the Yugoslav Attack
Castling is generally an important goal in theopening: it moves the king to safety away from thecenter files of the board, and it moves the rook to a more active position (the f-file if castling kingside; the d-file if castling queenside).
The choice regarding to which side one castles often hinges on an assessment of the trade-off between king safety and activity of the rook. Kingside castling is generally slightly safer because the king ends up closer to the edge of the board and can usually defend all of the pawns on the castled side. In queenside castling, the king is placed closer to the center and does not defend the pawn on the a-file; for these reasons, the king is often subsequently moved to the b-file. In addition, queenside castling is initially obstructed by more pieces than kingside castling, thus taking longer to set up than kingside castling. On the other hand, queenside castling places the rook more efficiently on the central d-file, where it is often immediately active; meanwhile, with kingside castling, atempo may be required to move the rook to a more effective square.
Players may forgo castling for various reasons. In positions where the opponent cannot organize an attack against a centralized king, castling may be unnecessary or even detrimental. In addition, in certain situations, a rook can be more active near the edges of the board than in the center; for example, if it is able to fight for control of an open or semi-open file.
Kingside castling occurs more frequently than queenside castling. It is common for both players to castle kingside, less common for one player to castle kingside and the other queenside, and uncommon for both players to castle queenside. If one player castles kingside and the other queenside, it is calledopposite castling oropposite-side castling. Castling on opposite sides usually results in a fierce fight, as each player's pawns are free to advance to attack the opponent's castled position without exposing the player's own castled king. Opposite castling is a common feature of many openings, such as theYugoslav Attack.
Tactical patterns involving castling are rare. One pattern involves castling queenside to deliver adouble attack: the king attacks a rook (on b2 for White or b7 for Black), while the rook attacks a second enemy piece (usually the king). In the example shown, from the gameMattison–Millers, Königsberg 1926,[18] Black played 13...Rxb2?? and resigned after 14.0-0-0+, which wins the rook.
Chess historianEdward Winter has proposed the name "Thornton castling trap" for this pattern, in reference to the earliest known example, Thornton–Boultbee, published in theBrooklyn Chess Chronicle in 1884. Other chess writers such asGary Lane have since adopted this term.[19]
a
b
c
d
e
f
g
h
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
a
b
c
d
e
f
g
h
White to play
Another example of tactical castling is illustrated in the diagrammed position from thecorrespondence game Gurvich–Pampin, 1976. After 1.Qxd8+ Kxd8 2.0-0-0+ Ke7 3.Nxb5, White has won a rook by castling with check and simultaneouslyunpinning the knight.[20]
a
b
c
d
e
f
g
h
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
a
b
c
d
e
f
g
h
Black to play
Such a double attack can also be made by castling kingside, although this is much rarer. In this position from the blindfold gameKarjakin–Carlsen, 2007, the move 19...0-0 threatens to win the rook on h7, as well as 20...Bxg5, when White cannot recapture due to the threat ofback rank mate. Black will thus win the g5-knight next move; 20.Rh6 Bxg5 21.Rxg6+ Kh7 22.Rxg5 would not work, as it would be met by 22...Rf1#.[21]
Viktor Korchnoi, in his1974 Candidates final match withAnatoly Karpov, asked thearbiter if castling was legal when the castling rook was under attack.[22] The arbiter answered in the affirmative, Korchnoi executed the move, and Karpov resigned shortly after.[23]
Castling occurred three times in the gameWolfgang Heidenfeld–Nick Kerins, Dublin 1973. The third instance of castling, the second one by White, was illegal, as the white king had already moved. The game is as follows:[24]
Black to move castled queenside, with the rook traversing the attacked b8-square.
In the gameYuri Averbakh–Cecil Purdy,Adelaide 1960,[25] when Purdy castled queenside, Averbakh queried the move, pointing out that the rook had passed over an attacked square. Purdy indicated e8 and c8 and said, "The king", in an attempt to explain that this was forbidden only for the king. Averbakh replied, "Only the king? Not the rook?" Averbakh's colleagueVladimir Bagirov then explained the castling rules to him in Russian, and the game continued.[26][27][28]
The diagram shows the final position of the gameLodewijk Prins–Lawrence Day (1968), where White resigned.[31] Had the game continued, Black could have checkmated by castling:
The game ended 10....Rxb2 11.dxe5 dxe5?? 12.Qxd8+ Kxd8 13.0-0-0+ and O'Kelly resigned since the rook is lost.
In the 1934Belgian Championship,[32] Otto Feuer caughtAlbéric O'Kelly in the Thornton castling trap. In the position in the diagram, the game continued 10...Rxb2 11.dxe5 dxe5?? 12.Qxd8+ Kxd8 13.0-0-0+, and O'Kelly resigned. Feuer's last move simultaneously gave check and attacked the rook on b2.
The diagram illustrates the consequences of losing castling rights.Fischer, with the white pieces, played 16.Ng7+ Ke7 17.Nf5+ Ke8.[33] Although all the pieces were now on the same squares, the two positions were not identical because Black, having moved his king, no longer had the right to castle. White now had time to build pressure on the black king without worrying that the king might escape by castling.
Black sees that if he plays 1...Nxe5, White responds with 2.d4, winning back the minor piece with afork and taking control of the center. Instead of allowing this, Black hopes to cause trouble for White by returning the piece while depriving White of the right to castle. White can easily castle artificially, however. For example:
2. Kxf2 Nxe5 3. Rf1
White begins castling artificially.
3... Ne7 4. Kg1 (second diagram)
White has achieved a normal castled position via several moves. With the bishop pair and a central pawn majority, White has a slight advantage.
In variants played on a standard 8×8 board, castling is often the same as in standard chess. This includes variants that replace the king with a different royal piece, as is the case with the knight in Knightmate. Some variants, however, have different rules; for example, inChess960, the king may move more or fewer than two squares (including none) when castling, depending on the starting position. Former worldFischer Random Chess ChampionWesley So was confused by the castling rules during the 2022 championships, and attempted to illegally castle out of check versusIan Nepomniachtchi.[36]
Castling can also be adapted to variants with different board sizes and shapes. Some such variants, likeCapablanca chess (10×8) orchess on a really big board (16×16), preserve the castling movement of the rooks, meaning that the king moves a different distance along theback rank. In a few variants, most notablyWildebeest chess (11×10), the player may choose to move the king any distance and move the rook accordingly.
Some chess variants do not feature castling, such aslosing chess, where the king is notroyal, andGrand Chess, where the rooks have significantly more opening mobility.
In ahandicap game with rook odds, the player giving odds may castle with the absent rook, moving only the king.[37][38]
Writing in 2019, former world chess championVladimir Kramnik proposed a variant of chess without castling. This variant would reduce king safety, theoretically leading to more dynamic games, as it would be considerably harder to force a draw and the pieces would be forced to engage in a mêlée.[39] In 2021, former world championViswanathan Anand defeated Kramnik 2½–1½ in a no-castling exhibition match under classical time controls.[40]
Castling is common inretrograde analysis problems. By chess problem convention, if a player's king and rook are on their original squares, the player is assumed to have castling rights unless it can be proved otherwise.[42] In some retrograde analysis problems, the solver (who usually plays White) is required to prove that the opponent has previously moved their king or rook and therefore cannot castle. This is sometimes accomplished by castling or by capturingen passant, thereby disproving other possible game histories.
Armand Lapierre
a
b
c
d
e
f
g
h
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
a
b
c
d
e
f
g
h
White to play and mate in two
The diagram shows a mate in two. 1.Rad1? 0-0 does not work. Thekey is 1.0-0-0! This demonstrates that the white king has not moved yet and that the rook on d4 must therefore be a promoted piece. Therefore, either the black king or black rook has previously moved to let the white rook off the back rank. Therefore Black cannot castle. After any move by Black, 2.Rd8 is mate.[43]
Some joke chess problems involve castling with a promoted rook of the opponent's color. In orthodox chess, this would be illegal since the rook would be giving check to the king, but under fairy chess conditions, this might not actually be check.
The diagrammed problem involves castling with an opposing rook under the Koko fairy condition (each piece must end up adjacent to another piece when moving).[45] The solution (Black's move being given first per helpmate convention) is:
1. Bg7 h8=R 2. Bf6 Kg6 3. 0-0 Kh7#
where, after 3.0-0, White's rook is not checking the king; a hypothetical capture of the king would result in the rook not being adjacent to any other piece, which is illegal under the Koko condition.
The allowance of castling with a "phantom rook" in handicap games has also been used in joke problems.[citation needed] Many other joke variations on castling are possible.
In 1907, C. Staugaard composed atwo-mover in which White promotes a pawn to a rook and then castles vertically with the newly promoted rook (placing the king on e3 and the rook on e2), since the rook has not moved. In the position on the right, White plays 1.e8=R, and after the forced move 1...Kxc2 castles vertically with the promoted rook, checkmating Black.
Vertical castling, also known as "Staugaard castling" or "Pam–Krabbé castling", has been used in a fewnovelty chess problems.[46][47]
Tim Krabbé's 1985 bookChess Curiosities includes a problem featuring vertical castling, along with an incorrect claim that the problem's 1973 publication promptedFIDE to amend the castling laws in 1974 to add the requirement that the king and rook be on the same rank. In reality, the original FIDE Laws from 1930 explicitly stated that castling must be done with a king and a rook on the same rank (traverse in French).[48] It is unclear whether any historically published sets of rules would technically allow such a move.
In most European languages, the term for castling is derived from the Persianrukh (e.g.rochieren,rochada,enroque), while queenside and kingside castling are referred to using the adjectives meaning "long" and "short" (or "big" and "small"), respectively.
^Korn, Walter (October 1961)."The Rules of Castling"(PDF).Chess Review. Vol. 29. p. 298.Archived(PDF) from the original on 2020-09-18. Retrieved2022-03-03.on castling, considerable confusion often reigns among beginners
^abTimmer, Robert (1997).Startling Castling!. Batsford. pp. 41–51, 149.ISBN0713481374.