Special moves

What is castling in chess?

Updated · Sergei Tovmasian

Short answer

Castling is the one move that shifts two pieces at once. The king travels two squares along the back rank towards one of its own rooks, and that rook hops over the king to the square it crossed. Kingside it is O-O (king e1 to g1, rook h1 to f1); queenside it is O-O-O (king e1 to c1, rook a1 to d1). The Laws count it as a single move of the king.

Play 1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 and White’s next move is almost always 4.O-O. The king leaves e1 and lands on g1. In the same turn, the rook that was buried on h1 flies over it and drops on f1. Two pieces move, one turn passes, one press of the clock. Nothing else in chess works like that.

8
7
6
5
4
3
2
a
b
c
d
e
f
g
h 1
The Italian Game, White to move. 1.O-O sends the king from e1 to g1 and the rook from h1 to f1, in a single turn.

The move, square by square

There are four castling moves in a game, two for each side, and every one of them is the king walking exactly two squares along its own back rank towards one of its own rooks. The rook then jumps to the square the king crossed.

  • White short: king e1 to g1, rook h1 to f1.
  • White long: king e1 to c1, rook a1 to d1.
  • Black short: king e8 to g8, rook h8 to f8.
  • Black long: king e8 to c8, rook a8 to d8.

Two squares for the king, every time. Not three, not one. Beginners who have seen the queenside castle sometimes think the king can slide all the way to b1 to get further from the action; it cannot, and if you want the king on b1 you play Kb1 as a separate move later, which is a very normal thing to do.

8
7
6
5
4
3
2
a
b
c
d
e
f
g
h 1
The same game one move later. The king sits on g1 behind three untouched pawns, and the rook on f1 already stares down the f-file.

Compare the two pictures. Before, the king stood on e1 in the middle of the board, on a file that is about to open, and the h1 rook had no future at all. After, the king is in the corner behind f2, g2 and h2, and the rook has joined the game without spending a move of its own. That is the whole appeal.

Short and long

Kingside castling is written O-O and everybody calls it castling short. Queenside is O-O-O, castling long. The extra O is not decoration: it stands for the extra square the queenside rook travels, because a1 to d1 is three squares while h1 to f1 is only two.

8
7
6
5
4
3
2
a
b
c
d
e
f
g
h 1
A Queen's Pawn opening with b1, c1 and d1 cleared. 1.O-O-O puts the king on c1 and lands the a1 rook on d1, right behind the queen.

Notice how much more work long castling needs. Three squares have to be empty (b1, c1 and d1), which means the knight, the bishop and the queen all have to go somewhere first. Short castling needs only f1 and g1 clear, so it tends to be available several moves earlier, which is one reason it is far commoner. There is a whole page on castling queenside and another comparing the two sides if you want the trade-offs.

The five conditions

Castling is legal only when all five of these are true at the same time (FIDE Laws, Art. 3.8):

  1. Your king has never moved in this game.
  2. The rook you are castling with has never moved.
  3. Every square between the king and that rook is empty.
  4. Your king is not in check right now.
  5. Neither the square the king crosses nor the square it lands on is attacked by an enemy piece.

The first two are permanent. Move the king to f1 and back to e1 and the right is still gone. The last three are about this moment only: block the check, chase the bishop away, develop the knight, and you can castle next move instead. That difference catches more people than any other part of the rule, and the full castling rules page works through each condition with the two things that look like they should stop you and do not.

Also note what is missing from that list. Nothing says the rook has to be safe. Nothing says the rook cannot pass over an attacked square. Nothing says your opponent must have castled, or that you must castle by a certain move.

Why it is almost always right

Two jobs, one move. The king goes from the middle of the board, where the queens and rooks live, to a corner behind a wall of pawns. And a rook that started in a corner doing nothing arrives on f1 or d1, on a file that is about to matter.

Most short games I see at club level end the same way. Somebody left the king on e1, somebody else opened the e-file or dropped a bishop on f7, and eight moves later it was over. Castling is the cheapest insurance in chess: one move, and the two most common beginner disasters (a check down the e-file, a queen and bishop landing on f7) both get much harder to arrange. There is more on that habit in the piece on how to stop blundering.

So castle early, by move ten unless you have a concrete reason not to, and pick the side by asking one question: where will my opponent’s pawns be in five moves? Then go and solve a few castling puzzles, where the move itself is the answer, and see if you spot it faster than your opponent does.

More questions

Why is castling allowed at all?

To speed the game up. It grew out of the king's leap, a medieval European rule that let the king jump once in a game rather than crawl a square at a time out of the centre. The version we play, king two squares and rook over the top, took several centuries to settle into one shape, and it survives because it does two useful jobs in one turn: it hides the king behind a wall of pawns and drags a corner rook towards the middle.

How often should I castle?

In almost every game, and usually inside the first ten moves. My rule for students is simple: develop a knight, develop a bishop, castle, then think. The exceptions are real but rare, mostly closed positions where the centre is locked and nobody can get at your king anyway, or a forced sequence that wins material first.

Can you castle twice in a game?

No. Once the king has moved off e1 or e8, both castling rights are gone for the rest of the game, and castling moves the king. So each player castles at most once, on one side or the other. If a rook ends up back on h1 and the king on e1 after a long walk, the right still does not come back.

Is castling ever a mistake?

Sometimes. If your opponent has already thrown pawns at the kingside, castling into g4 and h5 can be walking into the fire, and strong players will castle the other way or leave the king in the centre a little longer. But at beginner level the mistake is nearly always the other one: leaving the king on e1 while the centre opens.

Go deeper

Castling, en passant and promotion all have their own tactics. Drill them in the app.

← All: Special moves · Learn chess