← StudyX Devlog

Castling Rules: When You Can Castle and When You Cannot

Hiroki ObaraHiroki Obara · DeveloperStudyX MindsportsHow-To
Castling Rules: When You Can Castle and When You Cannot

Chess has exactly one move that moves two pieces at once: castling, where the king and a rook move together. People who have just learned how the pieces move often get stuck here next. The movement itself is simple. The trouble is the number of conditions about when you may and may not do it.

In this post I sort out those conditions based on Article 3.8 of the FIDE Laws of Chess.

How it moves

In castling, the king moves two squares towards a rook, and that rook is placed on the square the king has just crossed. Under the Laws it counts as a single move of the king.

For White there are two ways:

  • Kingside (short castling): the king goes from e1 to g1, and the rook on h1 goes to f1.
  • Queenside (long castling): the king goes from e1 to c1, and the rook on a1 goes to d1.

Black does the same on the eighth rank, with the king going from e8 to g8 or c8. In notation, kingside castling is written O-O and queenside castling O-O-O. There is one more square between king and rook on the queenside, which is why it is called long.

Two kinds of “cannot”

The FIDE Laws split the cases where castling is not allowed into two kinds: those that are permanent, and those that only apply in the current position.

Lost for good

  1. The king has already moved.
  2. The rook you want to castle with has already moved.

If the king has moved even once, castling is gone on both sides. If a rook has moved, castling is gone on that side only, and you can still castle with the other rook.

Prevented for now

  1. The square the king stands on, the square it must cross, or the square it will land on is attacked by an enemy piece.
  2. There is a piece between the king and the rook.

Conditions 3 and 4 can change. Once the piece in between moves away, or the enemy piece’s attack disappears, you can castle again.

“The square the king stands on is attacked” in condition 3 simply means the king is in check. You cannot castle out of check.

The conditions as a list

You can castle when all of these are true:

  • The king has never moved.
  • The rook you castle with has never moved.
  • There are no pieces between the king and that rook.
  • The king is not in check.
  • The square the king crosses is not attacked.
  • The square the king lands on is not attacked.

The last one is the same as for any move: you may not put your own king on a square where it would be in check.

Common misunderstandings

Even after learning the conditions, there are a few places where people go wrong.

You can castle even if the rook is attacked. Only the king’s squares matter: where it stands, where it crosses and where it lands. If the rook is under attack, or the rook passes over an attacked square, castling is still allowed.

On the queenside, b1 may be attacked. In queenside castling the rook passes b1, but the king goes through d1 and stops on c1, so it never crosses b1. The b1 square only has to be empty. If an enemy piece covers it, you can still castle. For Black the same is true of b8.

Having been in check before does not matter if the king never moved. If you met an earlier check by blocking or by capturing the checking piece, without moving the king, you keep the right to castle.

A rook that moved and came back still cannot castle. If the rook goes from h1 to h3 and later back to h1, it can no longer castle. The same goes for the king. Even if the position looks like the starting setup, what counts is whether the piece has ever moved.

Touch the king first. In games over the board, Article 4.4 of the Laws says that if you touch your king and a rook, you must castle on that side if it is legal, and that if you deliberately touch the rook first and then the king, you may not castle on that side on that move. When you castle, move the king first. That keeps you safe.

Why castle at all

There are two main purposes.

The first is to move the king somewhere safe. At the start of the game the king sits in the middle, on e1. The centre is where pawns advance and lines open, which makes it easy for the opponent to attack. Castling takes the king towards the side in one move, with pawns in front of it as a wall.

The second is to bring a rook into play. A rook in the corner has few chances to move. After castling it stands on f1 or d1, nearer the centre, and the two rooks are connected.

That is why beginners are often told to castle early, once the knights and bishops are out.

Kingside or queenside

In practice kingside castling is more common. Only the knight and bishop stand between the king and the rook, so it can be done early. Queenside castling needs three pieces out of the way, the knight, the bishop and the queen, so it takes a little longer.

After queenside castling the king is on c1 and does not protect the a2 pawn directly. Players often spend one more move to bring the king to b1. In return, the rook on d1 is immediately active on the central d-file.

It is also well known that when the two sides castle on opposite wings, the game often becomes sharp, with each side pushing pawns towards the other king. While you are starting out, you can castle kingside as your default and think about the choice later. English Wikipedia’s Castling article covers the history and the finer points.

Castling in Mindsports

StudyX Mindsports is an app with 12 mind sports, chess among them. Chess follows the full competition rules, including castling, en passant and promotion.

To castle, tap the king to select it, then tap the square two steps to the side: the g-file for kingside, the c-file for queenside. The rook moves to the other side by itself. When castling is not allowed, that square does not appear among the king’s possible moves, so you can see on the board whether the conditions are met. When you castle, the screen shows CASTLING, and the move is recorded as O-O or O-O-O.

The chess beginner lessons include a unit on castling. You play both kingside and queenside castling, and you also meet positions where castling is not allowed. The lessons are available in 15 languages. After the lessons you can play the CPU from Lv.1 to Lv.50. It goes up one level when you win and down one when you lose.

The games and beginner lessons are free, with ads. Each game’s first advanced lesson is free too, and a one-time purchase opens the rest and removes the ads. The full rules of chess are in Chess rules for beginners, and how to use Mindsports is in Getting Started with Mindsports.

Download on the App Store Get it on Google Play