Castling is a move in the game of chess involving a player's king and either of the player's original rooks. It is the only move in chess in which a player moves two pieces in the same move, and it is the only move aside from the knight's move where a piece can be said to "jump over" another.
Castling consists of moving the king two squares towards a rook on the player's first , then moving the rook to the square that the king crossed. Castling may be done only if the king has never moved, the rook involved has never moved, the squares between the king and the rook involved are unoccupied, the king is not in check, and the king does not cross over or end on a square attacked by an enemy piece. Castling is one of the rules of chess and is technically a king move (Hooper & Whyld 1992:71).
The notation for castling, in both the descriptive and the algebraic systems, is 0-0 with the rook and 0-0-0 with the rook; in PGN, O-O and O-O-O are used instead. Kingside and queenside castling are also called castling short and castling long, respectively, referring to the distance the rook moves (Hooper & Whyld 1992).
Castling was added to European chess in the 14th or 15th century and developed into its present form in the 17th century, though variations in castling rules persisted in Italy until the late 19th century. The Asian versions of chess do not have such a move.
Castling is permissible provided all of the following conditions hold:
Conditions 4 through 6 can be summarized with the more memorable phrase: One may not castle out of, through, or into check.
There are several common misconceptions about castling. To clarify:
Under the strict touch-move rules enforced in most tournaments, castling is considered a king move, and thus the king must be touched first; if the rook is touched first, a rook move must be made instead. Under current US Chess Federation rules, however, a player who intends to castle and touches the rook first would suffer no penalty and would be permitted to castle, provided castling is legal in the position. Still, the correct way to castle is to move the king first. 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. A player who performs a forbidden castling must return the king and the rook to their original places and then move the king, if there is another legal king move (this can include castling on the other side). If there is no legal king move, the touch-move rule does not apply to the rook (Just & Burg 2003:13–14, 17–18, 23).
FIDE rules require that the entire move be completed with one hand. However, neither of the aforementioned rules is commonly enforced in casual play or commonly known by non-competitive players (Just & Burg 2003:13–14, 17–18, 23).
Castling has its roots in the king's leap. There were two forms of the leap: the king would move once like a knight, or the king would move two squares on his 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 was played 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 second , and the rook and king moved to each other's original squares (Davidson 1981:48).
Various changes to castling resulted from the fact that the queen and bishop became more powerful in the 16th century. As this allowed them to attack from a distance and from both sides of the board, kings were no longer as safe in the center. (Davidson 1981:16)
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 if no capture was made and the king was not in check and did not move over check; the black king might move similarly. In Lombardy, the white king might also jump to a2, b1, or h1, with equivalent squares applying to the black king. Later, in Germany and Italy, the king move was accompanied by a pawn move.
The current version of castling was established in France in 1620 and in England in 1640 (Sunnucks 1970:66).
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 called free 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 by Aaron Alexandre. The practice was adopted in the first edition (1843) of the influential Handbuch des Schachspiels and soon became standard.
It is sometimes falsely claimed that the rules of castling were amended in 1974 to remove a loophole that allowed for vertical castling with a newly promoted rook on the e-file, possibly inspired by Tim Krabbé's 1983 book Chess Curiosities. In reality, the original FIDE Laws from 1930 explicitly stated that castling must be done with the king and rook on the same rank ("traverse" in French). This form of castling (known as "Pam-Krabbé castling" or "Staugaard castling") has only been used in a few novelty chess problems.
Castling is generally an important goal in the opening because it serves two purposes: it moves the king away from the of the board, and it moves the rook to a more active position in the center of the board.
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 the pawn on the a- is undefended; 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 is; therefore, it may take slightly longer to achieve 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, a tempo may be required to move the rook to a more effective square.
One may forgo castling for various reasons. In positions where one's opponent cannot organize an attack on one's centralized king, castling may be unnecessary or even detrimental. In addition, a rook can be more active near the edges of the board than in the center in certain situations, such as 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, somewhat uncommon for one player to castle kingside and the other queenside, and rare for both players to castle queenside. If one player castles kingside and the other queenside, it is called opposite (or opposite-side) castling. Castling on opposite sides usually results in a fierce fight, as each player's pawns are free to advance to attack the opposing king's castled position without exposing the player's own castled king. An example is the Yugoslav Attack in the Dragon Variation of the Sicilian Defence.
Tactical motifs involving castling are rare. One pattern involves castling queenside in order to attack a rook on b2 (or b7 for Black) while simultaneously giving check or attacking a piece with the rook. This was named the "Thornton castling trap" by chess historian Edward Winter after the earliest known example, Thornton-Boultbee, published in the Brooklyn Chess Chronicle in 1884.
In the game Yuri Averbakh–Cecil Purdy (1960), Black castled queenside. Averbakh pointed out that the rook passed over a square controlled by White, thinking this was illegal. Purdy pointed out that the castling was legal since this applies only to the king, to which Averbakh replied, "Only the king? Not the rook?" (Evans 1970:38–39), (Lombardy & Daniels 1975:188).
In the game Edward Lasker–Sir George Thomas (London 1912), Black had just played 17...Kg1. White could have checkmated by 18.0-0-0#, but he instead played 18.Kd2#. (See Edward Lasker's notable games.)
The diagrammed position is based on a hypothetical continuation of the game Lodewijk Prins–Lawrence Day (1968) after the moves 29.Kf6 Qf5+ 30.Kg7 Qg6+ 31.Kh8. Black can checkmate by castling: 31...0-0-0#. (See Lawrence Day's notable chess games.)
In the 1934 Belgian Championship, Otto Feuer caught Albéric O'Kelly in the Thornton castling trap. In the position in the diagram, O'Kelly captured the pawn with 10...Rxb2, and resigned after 11.dxe5 dxe5?? 12.Qxd8+ Kxd8 13.0-0-0+. Feuer's last move simultaneously gave check and attacked the rook on b2.
Black sees that if he recaptures with 4...Nxe5, White responds with 5.d4, winning back the minor piece with a fork 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. However, White can easily castle artificially. For example:
White has achieved a normal castled position (Rf1, Kg1), but in several moves. With a developed king, the bishop pair, and a central pawn majority, White has a slight advantage.
Variants of Western chess generally include castling in their rule sets, sometimes in a modified form.
In variants played on a standard 8×8 board, castling is often the same as in standard chess. Exceptions exist, however; for example, in chess960, the king may move more or fewer than two squares (including none) while castling, depending on the starting position.
Castling can also be adapted to variants with different board sizes. Some such variants, like Capablanca Chess (10×8) or Chess on a Really Big Board (16×16), preserve the castling movement of the rooks, meaning it is the king that moves a different distance along the board. Conversely, other games, like Dragonfly (7×7), specify that the king still castles two squares in each direction, and the rook is the piece that moves differently. A few variants, most notably Wildebeest chess (11×10), allow the player to choose how many squares they want to move the king (and move the rook accordingly).
There exist chess variants that do not have castling at all, such as losing chess. In variants played on non-rectangular (e.g. triangular, hexagonal, or three-dimensional) boards, castling usually does not feature.
Writing in 2019, former world chess champion Vladimir Kramnik proposed a variant of chess where players would not have the ability to castle. As the king could no longer castle into safety, this variant would theoretically lead 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. In 2021, former world champion Viswanathan Anand defeated Kramnik in a no-castling exhibition match under classical time controls 2.5-1.5.
Castling commonly features in chess problems. If the king and rook are on their original squares, castling is assumed to be legal unless it can be proved by retrograde analysis that either the king or the chosen rook has previously moved. Some retrograde analysis problems include a theme whereby one of the players (usually White) makes a move such as castling or an en passant capture in order to prove that the opponent has previously moved their king or rook and therefore cannot castle.
In most European languages, castling is known by a derivative from the same root as the English word "rook" (e.g. rochieren, rochada, enroque), while the local adjectives meaning "long" and "short" (or "big" and "small") are used in those countries to refer to queenside and kingside castling, respectively.