← All Tactics

X-Ray Attack

Stage 3Advanced Tactic

An X-ray is a tactic in which a long-range piece (rook, bishop, or queen) projects influence through an enemy piece on the same line, hitting or defending the square beyond. Kenneth Harkness proposed the name for this type of double attack in the April 1947 Chess Review, in his "Picture Guide to Chess" series. The defining property is that the intervening piece is enemy, not friendly. When the blocker is friendly, moving it can create a discovered attack. A battery specifically means compatible friendly long-range pieces working along the same line, such as doubled rooks; a rook blocked by its own knight is not a battery.

Here is the basic X-ray attack. The d1-rook projects through Black's d5-pawn onto the d8-rook beyond it (latent control rather than an immediate capture). The eye stops at the first enemy piece on d5, but the rook's influence reaches all the way to d8. The moment the d5-pawn leaves the file (a capture off the file such as dxc4/dxe4 - a push to d4 stays on the d-file and does not open the line) the d-file opens and the rook attacks d8 directly. This guide follows the Lichess theme convention, with an enemy piece in the middle.

8
7
6
5
4
3
2
a1
b
c
d
e
f
g
h
Key piece
Rook x-ray (latent) - the d1-rook eyes the d8-rook through Black's d5-pawn. It isn't a direct attack yet; it fires the moment the d5-pawn leaves the file.

How often does it show up

Of the 212,300 puzzles in this site's database, 800 (0.4%) carry the x-ray tag. For scale, the fork tag sits at 17,829 and the pin at 13,506.

46.0% also carry the mate tag, and 31.1% are mate in 2. Among the three line tactics compared here, the mate shares are lower for pin at 15.1%, discovered attack at 9.6%, and skewer at 0.1%. This comparison does not rank every line-based motif, but it suggests that looking at the king first is especially useful in this site's x-ray set. The tag alone does not identify what the other 54% of puzzles achieve.

The two selected rating bands are similar: 25.4% fall below 1200 and 23.8% at or above 1900, with ratings from 623 to 2523. The phase labels also span both middlegame (53.6%) and endgame (45.1%). The dataset therefore shows no strong concentration in either of those two phases; it does not prove that x-ray frequency is independent of game phase.

Definition

Three points are aligned on a single file, rank, or diagonal. A long-range piece projects its influence through an enemy piece in the middle onto the far point.

  • X-ray attack: the enemy intervening piece is attacked through, and the far point holds another enemy piece or square you are putting under pressure.
  • X-ray defense: the enemy intervening piece is attacked through, and the far point holds one of your own pieces or a square you are defending - the X-ray protects it from across the line.

Both modes share the same essential feature: an enemy piece in the middle. In both cases, check the resulting position: the line opens only if no piece still blocks it. Moving along the same line, or replacing the captured blocker with another piece, may leave the line closed.

This is the standard convention used by Lichess ("a piece attacks or defends a square, through an enemy piece") and by most English chess literature.

Not to be confused with: Battery

A battery is when two or more of your own long-range pieces line up on the same file, rank, or diagonal - for example, doubled rooks on an open file, or a queen-and-bishop pair on a long diagonal. The front piece blocks the one behind it, but if the front piece is traded off the rear piece inherits the same line, so the pressure persists. It looks like an X-ray, but the front piece is your own, not the enemy's. Where the X-ray exploits the geometry across enemy lines, the battery builds force along its own.

Difference from Pin and Skewer - Same Geometry, Different Time Axis

The same three-piece-on-a-line geometry branches into four tactics depending on what the middle and far pieces are.

PinSkewerX-ray AttackX-ray Defense
Middle pieceEnemy (lower value)Enemy (higher value)EnemyEnemy
Far pieceEnemy (higher value)Enemy (lower value)EnemyYours
MechanismLeaving the line exposes the piece behind; an absolute pin forbids exposing the kingThe front piece is attacked; if it leaves, the rear piece is exposedMiddle removed/moves → far is attackedMiddle removed/moves → your far piece is supported by the X-ray retake
What to calculateCan the pinned piece move along the line or capture the attacker?Can the defender capture, block, or counterattack instead?Does the line actually clear?Can the defender recapture after the line clears?

Note that all four tactics rest on the enemy piece in the middle - that's what makes them part of the same family. A friendly blocker may instead form a discovered-attack setup. It is a battery only if compatible long-range pieces work together on that line.

These labels can overlap: a pin restricts a piece because of the target behind it, while X-ray describes influence through a blocker. None of these alignments alone guarantees an immediate material gain. Calculate both sides' replies when the line opens.

Why X-rays Get Missed

  1. Vision stops at the intervening piece. The eye naturally stops at the first enemy piece on a line. You must consciously extend the trace through that piece to see what's behind it.
  2. "Can't attack now" is read as "no threat". X-rays are latent control. Their value emerges only when you also calculate how and when the middle piece can be removed or forced to move.
  3. Defensive X-rays go unnoticed. It is easy to spot an X-ray attack that menaces an enemy piece, but harder to see that your own rook is X-ray defending one of your pieces through an enemy blockader. Defenders should always trace their long-range lines past enemy pieces too.

Example 1 in Detail: The Latent Control of a Rook X-ray

Look more closely at the example at the top (White rook d1, Black pawn d5, Black rook d8, Black king g8).

Right now the d-file is blocked by the d5 pawn, so the d1 rook exerts no direct pressure on the d8 rook. The X-ray, however, is already in place. The moment the d5 pawn moves off the file (if a white piece were on c4 or e4, a capture there would do this; a push to d4 stays on the d-file), the d-file opens and the d1 rook attacks the d8 rook directly. Note that a White pawn capture on d5 would itself sit on d5 and re-block the file - the attacking line must be clear after the move. Rxd5 would put the attacking rook itself on d5, from where it attacks d8, but Black could answer Rxd5.

The bare diagram has no white piece on c4 or e4, so those captures are hypothetical. If the file opens, both rooks attack each other: whose turn it is and which rook is protected determine whether either side gains anything.

The X-ray's value is that it does not need to fire now. The setup retains its value as a future option - provided the exchange when it does fire is favorable (see "Common Mistakes" below for cases where premature activation is a losing exchange).

Example 2: X-ray Defense - Through an Enemy Piece

This is a clean X-ray defense in the standard sense: the intervening piece is enemy, and what is being defended is yours.

  • White rook: a1 (the defender)
  • White king: b2 (protects the a1 rook)
  • White pawns: a7 (advanced passed pawn, on the verge of promotion), f2, g2, h2
  • Black rook: a4 (intervening enemy piece)
  • Black knight: b6 (protects the a4 rook and covers a8)
  • Black king g7, Black pawns f7, g6, h7
8
7
6
5
4
3
2
a1
b
c
d
e
f
g
h
Key piece
X-ray defense - the a1 rook guards the a7 pawn through the intervening a4 rook. If Black plays Rxa7??, the a4 square clears and Rxa7 wins the rook for a pawn.

The only piece between a1 and a7 is the black rook on a4. At first glance it seems to cut off White's rook from defending a7. The X-ray says otherwise: the a1 rook defends a7 through the a4 rook. The moment the a4 rook leaves the a-file, or goes to a7 itself, the a1 rook's line reaches a7 directly.

The other pieces are there so the example holds up. The two rooks also attack each other directly, which is why the White king stands on b2: Rxa1 Kxa1 is only a rook trade. The black knight on b6 protects a4 and covers a8, so White cannot simply push a8=Q either.

If Black plays Rxa7?? (the a4 rook captures the pawn):

  • a4 is vacated. The a1 rook now sees down the open a-file to a7.
  • White recaptures with Rxa7 and wins the black rook. Nothing else on the board can capture it.
  • Material result: White gives up a pawn and wins a rook. Stockfish (depth 22) rates the position after 1...Rxa7?? 2.Rxa7 at about +2.5 for White, while the best move in the diagram leaves Black slightly better.

So although the pawn looks undefended, the a1 rook defends it through the a4 rook, and Rxa7 is a losing capture for Black. That is what "latent" control means here: no line on the board shows the defense until the blocking rook moves.

Example 3: Bishop X-ray Attack - Through an Enemy Pawn

Bishops make X-rays along diagonals in the same way.

  • White bishop: b2 (long a1-h8 diagonal)
  • Black pawn: e5 (mid-diagonal, intervening enemy piece)
  • Black rook: h8 (far end of the diagonal, target)
8
7
6
5
4
3
2
a1
b
c
d
e
f
g
h
Key piece
Bishop X-ray (latent) - the b2 bishop eyes the h8 rook through the intervening e5 pawn. It is not a direct attack yet; it activates the moment the e5 pawn leaves the diagonal (e4 advance, or exf4 if a white piece is on f4). The capture exd4 stays on this diagonal and does not open it.

Right now the b2-h8 diagonal is blocked by the e5 black pawn, so the bishop does not directly threaten the h8 rook. The X-ray, however, is in place. After ...e4 the pawn leaves the diagonal, and the bishop attacks h8. A capture on f4 would also leave it, but ...exd4 would put the pawn on another square of the same b2-h8 diagonal and keep the rook screened.

In this bare diagram, White can play Bxe5, removing the undefended pawn and attacking h8 from e5. If a black pawn is added on d6, Black can answer Bxe5 with dxe5, so the capture is no longer free. Check the defenders and recaptures before trying to open a line. A black ...e4 move would expose h8, but that geometric fact alone does not prove that White can win the position: the exchanges and other threats still need to be calculated.

Pawn movement check: a capture need not clear the line

This separate exercise adds a white pawn on d4 and a black pawn on c5. Initially, two pawns block b2-h8: White's d4-pawn and Black's e5-pawn. It is not the single-enemy-blocker X-ray diagram above. Its purpose is to follow what remains on the diagonal after each capture.

  1. ...exd4 replaces the white d4-pawn with a black pawn. The bishop still does not attack h8 directly.
  2. Bxd4 does open the bishop's attack on h8. The pawn is not an unbreakable shield.
  3. ...cxd4 captures that bishop, so White has given up a bishop for a pawn. Before clearing a line by capture, check the opponent's recapture.

In the original diagram above, without the added c5- and d4-pawns, ...e4 leaves the diagonal and exposes h8 immediately. In this exercise, ...e4 alone would still leave White's d4-pawn blocking it. The destination and the other blockers matter, not just whether a pawn moved.

No captures+3
8
7
6
5
4
3
2
a1
b
c
d
e
f
g
h
Start(0/3)

Setup Stages

X-rays carry value before they fire. The setup alone contributes to position evaluation.

  1. Line alignment: place your long-range piece on a line that points, through an enemy piece, at the relevant far square - an enemy target for attack, or one of your own pieces for defense.
  2. Confirm the middle piece is enemy: if the blocker is friendly, consider a discovered attack. Call it a battery only when compatible long-range pieces cooperate along that line.
  3. Activation analysis: determine how the enemy middle piece can be removed or forced to move (capture, tempo threat, the opponent voluntarily clearing it, etc.).
  4. Latent maintenance: if immediate activation is unfavorable, simply maintain the setup - the X-ray persists for as long as the alignment holds.

Common Mistakes

  1. Forcing activation prematurely. If forcing the middle piece to move costs more than the X-ray gains, the activation is a losing exchange. Wait until the trade arithmetic favors you.
  2. Missing the opponent's matching X-ray. When the line opens, their X-ray may fire first. Always evaluate both sides of the line at once.
  3. Treating a pin as total immobility. A pinned piece may move along the pin line or capture the attacker. An absolute pin forbids exposing the king; a relative pin may be broken if the continuation justifies it. Name the pin, then calculate the moves rather than assuming it wins material.
  4. Calling every friendly alignment a battery. A rook behind its own knight can be a discovered-attack setup. Doubled rooks or a queen-bishop pair working on a diagonal can form a battery. The pieces' movement matters, not just their color.

Defending Against an X-ray

If the opponent has aimed an X-ray at your valuable piece:

  1. Move the target off the line. Remove what sits at the far end.
  2. Keep a reliable blocker until the target is safe. Check whether the opponent can capture or deflect that blocker with tempo; simply leaving it in place is not enough if it can be forced away.
  3. Capture or chase the long-range attacker. Dismantle the setup at its source.
  4. Check for counter-pressure on the same line. Your own slider may attack back when the line opens. This is not automatically an equal trade: calculate whose turn it is and which pieces are defended.

Checklist

  • Does one of your long-range pieces project through an enemy piece onto a relevant far square (attack target or piece-to-defend)?
  • Is the middle piece definitely enemy? (If friendly, check for a discovered-attack setup or a compatible battery.)
  • How can the enemy middle piece be removed or forced to move?
  • Is the exchange value favorable at the moment of activation?
  • Is the opponent also operating an X-ray on the same line?
  • Pin - moving off the line exposes a valuable piece or the king behind it. Movement along the line may still be possible.
  • Skewer - attacking the front piece can expose a target behind it when it moves; check for defensive alternatives.
  • Discovered Attack - same line geometry but with a friendly middle piece that moves to reveal an attack. A separate motif, not an X-ray.
  • Fork - X-rays frequently underpin double-attack combinations on a single line.
  • Clearance - clearing a square or line for a follow-up. Check that the departing or captured blocker is not replaced by another blocker.

FAQ

Q. How does an X-ray attack differ from a skewer? A skewer attacks the front piece to expose the one behind when it moves. X-ray describes influence beyond a blocking enemy piece; that front piece may already be directly attacked. The ideas can overlap. In either case, check whether the defender can capture the attacker, block the line, or create a stronger threat.

Q. How is an X-ray different from a battery? The difference is who owns the middle piece. In an X-ray, the intervening piece is enemy - your long-range piece is reaching past an opponent's piece. In a battery, compatible long-range pieces of your own work together on the same file, rank, or diagonal - you are stacking friendly force along the line. Doubled rooks on an open file, or a queen-bishop pair on a long diagonal, are batteries. Don't call them X-rays.

Q. Is X-ray defense a real term? Yes, although it is used less often than X-ray attack. Lichess defines its single xRayAttack theme as "a piece attacks or defends a square, through an enemy piece" - both modes share the same slug, but the literature does distinguish them when emphasis matters.

Q. Are X-rays only for rooks, bishops, and queens? Yes. Only long-range sliding pieces can project influence through a line. Knights jump rather than slide, so their geometry is not X-ray. Pawns have a one-square reach and don't apply.

Q. What is the fastest way to learn X-ray patterns? The key habit is tracing every rook, bishop, and queen line all the way to its end. Train your eye not to stop at the first enemy piece - always check what stands beyond. Patterns like a rook aiming through an enemy piece at a target behind it, bishop diagonals ending on the enemy king, or queen-rook on the same file become recognizable quickly once the habit forms.

References


Start training: X-ray Attack Training

Related: Pin · Skewer · All tactics