Chess Advanced Castling Rules

The special move of castling is tricky enough. The basics of castling include: You have to move two pieces at once, both the King and Rook, and they have to jump over each other. The King has to move exactly two squares. But that's not even the full list of obscure restrictions. There's a handful of other rules that restrict you from castling in a number of situations.

Special Advanced Castling Rules: Checks

There are a number of special times when castling is not allowed, even though it looks like you could castle. Castling is an illegal move in these situations. These include:

Cannot castle out of check: If your king is in check by any opponent piece (or pawn), you cannot castle. If you check someone's king, they cannot escape by castling.

Cannot castle into check: This rule seems quite reasonable. Your king is not allowed to move into check in other moves in the game, and this is also true for castling. So if the castling move would put your King where it would be in check, then castling is not allowed.

Cannot castle through check: This rule is quite tricky. If refers to the squares through which your king moves to castle. Not the starting square, not the final square, but the square between. If that in-between square is attacked (checked) by an enemy piece or pawn, you cannot castle. This is true even though the King couldn't actually get taken by the piece after it castled. It's just a rule that makes castling illegal. This means that you can stop someone from castling by attacking the square next to the king. It can be helpful to prevent your opponent from castling, so they have to leave their King in the middle.

Checking your opponent is OK. Yes, you can castle giving check. If at the end of the castling move, your rook is attacking your opponent's King, that's fine. In fact, it's often a good move which protects your king while attacking the enemy king. It doesn't happen often in games, but does occasionally.

Rook attacked is OK: You can still castle even if the Rook is attacked. It's only checks on the King that prevent castling, not attacks on the Rook.

Rook moving through attacked square is OK: On the Queenside, the Rook moves through the 'b' file square (b1 or b8), but the King doesn't move through that square. If that square is attacked by the enemy, castling is still allowed, it is OK. This only relates to Queenside castling; on Kingside castling the King moves through exactly the same squares as the Rook.

Special Advanced Castling Rules: Previously Moved

You cannot castle if there have been previous moves in the game by the King or Rooks.

Cannot castle if the King has previously moved: If your King has ever made any move in the game, it cannot castle on either side. This is true even if the king moves back to its original square.

Cannot castle if the Rook has previously moved: If the Rook has previously moved ever in the game, you cannot castle with that Rook. You can still castle with the other Rook (if it hasn't moved). Even if the Rook moves back to its original square, you still cannot castle on that side with that Rook.

Your opponent's moves are ok. If your opponent has moved their King, it doesn't affect you. They cannot castle, but you still can (if your own King hasn't moved).