X-Ray Attack in Chess: What It Means and How to Use It

TL;DR The x-ray motif relies on the long-range movement of rooks, bishops, and queens along a single rank, file, or diagonal, so it never applies to knights, kings, or pawns. An X-ray attack is when a piece attacks or defends through an enemy piece along the same line, as if seeing through it. Tactical patterns like this one have decided master games for over 150 years. This entry gives the precise definition, shows the idea in practice, and lists the mistakes club players actually make with it.
Disclosure: this guide was written by the team behind Chess DNA, the free AI chess-analysis app you'll see recommended below. About us

By Yuval Incze · Published Jul 5, 2026 · Updated Jul 5, 2026 · ~2 min read

X-Ray Attack — An X-ray attack is when a piece attacks or defends through an enemy piece along the same line, as if seeing through it.

What “x-ray attack” means in chess

An x-ray attack occurs when a rook, bishop, or queen lines up against a target with an enemy piece sitting in between on the same rank, file, or diagonal. The attacking piece is not blocked in the tactical sense — it is still exerting influence through the blocker, ready to act the moment that piece moves or is captured.

X-rays are commonly used for defense as well as attack: a rook can x-ray-defend a piece behind another rook, so if the front rook is captured, the recapture is already lined up. On the attacking side, x-rays set up combinations where removing the blocking piece reveals a bigger threat.

The related idea of x-ray defense means two same-color pieces stacked on a file both defend the point at the end of it, even though only the front piece looks active. Recognizing x-rays helps you evaluate whether a trade on a contested square is actually safe.

How it plays out in practice

Common mistakes

Does this concept show up in your games?

Definitions are the easy part — the hard part is knowing whether x-ray attack situations are winning or losing you games. Chess DNA analyzes your real Chess.com and Lichess games with Stockfish and shows the exact patterns — tactical motifs, structures, endgame situations — where you gain or lose rating, with targeted drills for the ones you keep getting wrong. Free to try on your recent games.

Frequently Asked Questions

What is an x-ray attack in chess?

An x-ray attack is when a long-range piece — rook, bishop, or queen — attacks or defends a square or piece through another piece standing in the way on the same line. The blocking piece does not fully stop the influence; the attacker is effectively "seeing through" it, ready to capture or recapture the instant the blocker leaves or is taken. It is a key idea for evaluating trades on contested files and diagonals.

How is an x-ray different from a pin?

A pin immobilizes the piece in front because moving it would expose something more valuable behind it, from the attacker's perspective on the far side. An x-ray is about the attacker's own line of influence passing through a piece to reach a target or support a recapture. The two often appear together, but a pin restricts the pinned piece's movement while an x-ray describes what the attacker can still do through it.

Can knights or pawns make x-ray attacks?

No. X-ray attacks only work with pieces that move along continuous lines — rooks, bishops, and queens — because the concept depends on influence traveling through a square occupied by another piece. Knights jump directly to a square and have no line to see through, and pawns only attack one square diagonally, so neither can x-ray.

Find the patterns in your games — free →

Related guides

About the author

Yuval Incze is the founder of Chess DNA and a long-time competitive chess player. He built Chess DNA to automate the diagnostic loop — game analysis, pattern detection, weakness ranking — so players study the specific things costing them rating instead of generic advice.