The X-Ray Attack in Chess, Explained Properly
An x-ray works through your own piece or the opponent's, which is why it hides so well. Here is how it differs from a skewer, plus the defensive version nobody teaches.
CheckmateX Team
Chess training & strategy experts • About us
Photo by Unsplash on Unsplash
In This Article
The Short Answer
> Quick answer: An x-ray is when a long-range piece exerts influence through another piece on the same line. If the blocking piece is the opponent's, you're attacking something behind it. If the blocking piece is yours, you're defending something behind it. It's the mechanism behind pins and skewers rather than a separate tactic, which is why definitions vary between books.
This term causes more confusion than any other in tactics vocabulary, and the reason is that different authors define it differently. Some use x-ray to mean any attack through a piece. Others reserve it for the defensive version.
Even reference glossaries disagree — the Wikipedia entry on chess tactics lists the x-ray as its own device while several training courses fold it into pins and skewers entirely.
I'll use the broad definition here because it's the more useful one for actual play: an x-ray is influence travelling through a piece along a line.
What matters isn't the label. It's training your eye to notice that a rook on an open file is doing something even when a piece stands in the way, because that's the perception club players lack.
The Offensive X-Ray
Picture a rook on e1, an enemy knight on e5 and an enemy queen on e8. The knight blocks the file, so nothing is hanging.
Except the knight can be forced to move, or captured, or deflected — and the moment it leaves, your rook is attacking the queen. That latent threat is the x-ray, and it turns quiet moves into tactics.
So the practical technique is: find the line, then find a way to remove the blocker. Capture it with something, attack it with a pawn, or give it a threat it must answer elsewhere. That last option overlaps with deflection, which is often the tool that makes an x-ray pay.
This is why strong players place rooks on files that look blocked. They're not attacking anything yet. They're arranging the position so that when the blocker moves — and blockers always move eventually — the tactic is already loaded.
X-Ray vs Skewer vs Pin
All three involve two enemy pieces on one line with your long-range piece aimed at them. The difference is which piece is where, and whether the front one can legally move.
A pin: the more valuable piece is behind, so the front piece is stuck. Move it and you lose the queen or expose the king.
A skewer: the more valuable piece is in front, so it moves away and you take what was behind it. Same geometry, reversed values.
An x-ray, in the sense most club players mean, is the same alignment where the front piece isn't currently obliged to move and isn't yours to capture — a potential rather than an immediate win. It becomes a skewer or a pin once you add a threat.
Our guide to forks, pins and skewers covers the first two properly. The reason to learn x-rays after them is that x-rays are how pins and skewers get created rather than found.
The Defensive X-Ray
This is the version that wins games and almost nobody teaches, so it's worth going slowly.
Your rook on a1 defends a pawn on a7 through an enemy rook on a4. Right now the enemy rook blocks the line, so it looks like a7 is undefended and hanging.
It isn't. If the enemy rook takes on a7, your rook recaptures — the defence operates through the enemy piece. That's a defensive x-ray, and engines find these instantly while humans miss them constantly.
The classic case is in rook endgames, where a rook on the same file as an enemy rook is often defending a pawn several squares behind it. Players resign positions that hold because they counted the defenders visually rather than along the line.
When you're checking whether something is hanging, look along the whole line rather than at the adjacent squares. The habit takes a few weeks to build and it saves half a point a month, which is a better return than most opening study.
Where X-Rays Actually Show Up
Open files after a rook trade are the most common home. Rooks doubled behind an enemy rook create exactly this geometry, and the doubled pair usually wins the file because the second rook is x-raying through the first.
Long diagonals are next. A bishop on b2 aiming at g7 stays relevant through any number of pieces, which is why fianchettoed bishops feel dangerous even when they're blocked — the position opens and suddenly they're hitting the king.
The back rank is the third. A rook on d1 pointing at an enemy rook on d8 with a king on g8 is a live x-ray waiting for the d-file to clear, and it interacts nastily with back rank mates.
Queen and bishop batteries on the same diagonal are the fourth, and they're the ones that produce the sacrifices. Anything that clears the diagonal — including sacrificing the front piece — becomes a candidate move.
How to Train the Pattern
The drill I use with students is deliberately mechanical. Take any middlegame position, pick one of your long-range pieces and trace its line to the edge of the board, listing every piece it passes through and what sits behind them.
Do that for each rook, bishop and the queen. It takes two minutes per position and feels tedious for about a week, after which you stop needing to do it consciously.
The reason it works is that x-rays fail the usual scanning method. Most players check what a piece attacks directly, which by definition skips everything behind a blocker.
Puzzle sets labelled "x-ray" are less useful than they sound, because knowing a tactic exists is most of the solution. Mixed puzzles where you don't know the theme train the harder skill — which is the same argument our piece on 50 puzzles a day makes about themed sets generally.
A Trap Worth Knowing
The most common practical x-ray blunder happens in queen endgames and it costs full points.
You check with your queen, the opponent blocks with a rook, you take the rook — and your queen is now on a line with your own king, with the enemy queen behind the piece you just captured. The recapture comes with check and you lose the queen.
Every serious player has done this at least once. It's not a knowledge failure, it's a scanning failure: you checked what the capture won and not what the resulting alignment created.
The fix is a single habit. Before any capture, look at the line your piece will be standing on afterwards, not the line it's on now. Alignment is what makes tactics work, and captures change alignment.
Our guide to analysing your own games covers spotting this pattern in your losses. If you find two of these in a month's games, the scanning habit is the highest-value thing you can fix.
One last detail that catches even strong players: an x-ray can operate through a piece that is pinned. A pinned defender still blocks the line physically, so the defensive x-ray behind it remains live even though the defender itself cannot legally move. Engines account for that automatically and humans almost never do.
Frequently Asked Questions
What is an x-ray attack in chess?
It's when a long-range piece exerts influence through another piece along the same line. If the blocker is an enemy piece, you're attacking what's behind it; if it's your own, you're defending what's behind it.
What is the difference between an x-ray and a skewer?
A skewer forces the more valuable front piece to move so you win the piece behind it. An x-ray is the underlying alignment without that immediate compulsion — it becomes a skewer or a pin once you add a threat that forces the blocker to move.
What is a defensive x-ray?
It's when your piece defends one of your own units through an enemy piece standing between them. The defence is real: if the enemy captures, you recapture along the line. Players lose drawn [rook endgames](/blog/rook-endgames-chess-how-to-win-and-draw) by not counting these defenders.
Are x-rays and pins the same thing?
They share the same geometry — two pieces on a line with a long-range attacker. A pin is the case where the front piece is stuck because something more valuable sits behind it. X-ray is the broader term for influence travelling through a piece.
How do I train myself to spot x-rays?
Trace each of your long-range pieces to the edge of the board and note what sits behind every blocker. It's slow for about a week and then becomes automatic. Ordinary scanning skips these because it only checks what a piece attacks directly.
Ready to Improve Your Chess?
Train openings, solve puzzles, play online, and climb the leaderboard with CheckmateX.
Download CheckmateX →Related Articles
Freestyle Chess (960) Explained for Club Players
Carlsen won the first FIDE Freestyle world title in 2026 and club players keep asking what the format is. Here are the rules, the castling trap and whether it helps you.
Chess Clock Management: How to Avoid Time Trouble
Losing won positions on the clock? Here's how to manage your time in chess — where to spend it, where to save it, and the habits that keep you out of time trouble.
Good Bishop vs Bad Bishop: A Chess Strategy Guide
Not all bishops are equal. Learn the difference between a good and bad bishop, how your pawn structure decides it, and how to fix a bishop that's doing nothing.