Bublik Games logo Bublik Gamesbrowser games Sign in RU

Castling in chess

Castling is the only move that shifts two pieces at once: the king goes two squares towards a rook and the rook hops over to stand beside him. Here are both kinds and the six cases where castling is not allowed.

In castling, the king moves two squares towards a rook and the rook jumps over him and lands next to him. You may castle only if neither the king nor that rook has moved, the squares between them are empty, and the king is not in check, does not pass through an attacked square and does not land on one. The remaining rules are in chess rules for beginners, and you can practise the move in the lessons of our free game Chess: Silk Road.

How does short castling work?

Short castling goes towards the nearer rook, on the kingside. The white king goes from e1 to g1 and the rook from h1 to f1. Black does the same on the eighth rank: king e8 to g8, rook h8 to f8. In notation it is written 0-0.

White castles short: the king from e1 to g1, the rook from h1 to f1
Short castling (0-0): king on g1, rook on f1

How does long castling work?

Long castling goes towards the far rook, on the queenside. The white king goes from e1 to c1 and the rook from a1 to d1; Black uses c8 and d8. It is written 0-0-0, and b, c and d squares between king and rook must be empty.

White castles long: the king from e1 to c1, the rook from a1 to d1
Long castling (0-0-0): king on c1, rook on d1
CastlingKingRookNotation
Short, Whitee1 to g1h1 to f10-0
Long, Whitee1 to c1a1 to d10-0-0
Short, Blacke8 to g8h8 to f80-0
Long, Blacke8 to c8a8 to d80-0-0

When you can't castle: six cases

  1. The king has moved. Even if he walked back to e1, the right is gone.
  2. That rook has moved. You lose castling only on that side.
  3. Pieces stand between them. For short castling f1 and g1 must be empty, for long b1, c1 and d1.
  4. The king is in check. Learn how to get out of check first.
  5. The king passes through an attacked square. If f1 is attacked, short castling is illegal.
  6. The king lands on an attacked square.
The white king is in check from the rook on e8, so castling is illegal
Case 4: the king is in check
A black rook on f8 attacks f1, so short castling is illegal
Case 5: f1 is attacked, short castling is illegal but long is fine

Two details. The rook itself may be under attack and you can still castle. And in long castling the king never crosses b1, so an attack on b1 does not matter.

A black rook attacks b1 but long castling is still legal
b1 is attacked, long castling is allowed: the king does not cross it

A practice task

Take the lesson position: White has king e1 and two rooks, Black only a king on e8. Castle short: the king goes from e1 to g1 and the rook from h1 to f1. Now answer yourself: what is needed for long castling here? b1, c1 and d1 must be empty, and c1 and d1 must also be unattacked. An attack on b1 does not matter.

Why castle?

Castling tucks the king behind pawns and brings a rook into play. It is usually done within the first ten moves. See how to set up a chess board if the starting position is new to you. A king left in the centre often faces how a game ends in checkmate early. In Fischer Random chess the pieces start on other squares, and the main guide, chess rules for beginners, lists every special move.

Frequently asked questions

Can you castle if your rook is attacked?

Yes. Only the king's own situation counts: not in check, not crossing or landing on attacked squares.

Can you castle after being in check?

Yes, once the check is gone and neither the king nor the rook has moved. You cannot castle while in check.

Can you castle if the king has moved?

No. The right is lost for the whole game, even if the king goes back.

How many times can you castle?

Once per player, because the king has moved afterwards.

Which piece do you touch first on a real board?

The king. If you pick up the rook first, the touch-move rule says you must move the rook.

Play

New The Silk Road map: Samarkand and the first opponent
ChessAgainst bots

Chess: Silk Road

A caravan travels the Silk Road: 18 cities and opponents, classic chess, Chess960, pawn battles, Japanese shogi and Chinese xiangqi. 300 checkmate puzzles, 12 lessons and two players on one screen.

Read next

More on the topic