Ruy Lopez: Moves, Variations, Plans and Traps

Ruy Lopez (1.e4 e5 2.Nf3 Nc6 3.Bb5) explained: Closed main line, Berlin, Marshall, Open and Exchange variations, plans, traps and Stockfish 17.1 evaluations.

Train the Ruy Lopez: 6 lines

Loading chessboard…

The Ruy Lopez is the chess opening that starts 1.e4 e5 2.Nf3 Nc6 3.Bb5. White's bishop attacks the knight on c6, the piece that defends Black's pawn on e5, and the pressure on Black's center lasts deep into the middlegame. Also called the Spanish Opening, it has been a main weapon at every level for centuries: White castles, plays c3 and d4, and builds a big center while Black is kept busy defending e5.

How to reach the Ruy Lopez

The Ruy Lopez has one normal move order. White attacks e5 with 2.Nf3, Black defends with 2...Nc6, and White pins nothing yet but hits the defender with 3.Bb5. If Black answers 2.Nf3 with 2...Nf6 (the Petrov) or 2...d6 (the Philidor), the Ruy Lopez never appears, so a 1.e4 e5 player needs answers to those too.

Transpositions are rare. The one worth knowing is the Four Knights: after 1.e4 e5 2.Nf3 Nc6 3.Nc3 Nf6 4.Bb5 you have a Ruy Lopez structure with both queen's knights developed, which is a calmer, separate system.

Start

The key position after 3.Bb5, with Black to move:

r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3

Open in the analysis board →

Note that 3.Bb5 does not threaten 4.Bxc6 and 5.Nxe5 yet. After 4.Bxc6 dxc6 5.Nxe5? Black plays 5...Qd4!, forking the knight and e4, and regains the pawn with the better game. The threat only becomes real once White has castled and played Re1 to defend e4.

Strengths and drawbacks

Strengths for White:

  • Lasting pressure on e5 that forces Black to make concessions such as ...a6, ...b5 or ...d6.
  • A clear long-term plan: c3, d4, and the knight route Nb1–d2–f1–g3.
  • The bishop on b3 aims at f7 for the whole game.
  • Huge choice of systems, from the quiet Exchange Variation to the Closed main line.

Drawbacks:

  • A lot of theory, especially in the Marshall Attack and the Berlin.
  • The edge is small; well-prepared opponents equalize with the Berlin or the Marshall.
  • The bishop can be trapped on b3 by ...c5–c4 if White is careless (see the Noah's Ark Trap below).
  • Games are slow. If you want a fast attack, the Italian Game or the Scotch gets you there sooner.

Main variations

Closed Ruy Lopez (Morphy Defense main line)

Black's most common answer is 3...a6, the Morphy Defense, and the Closed main line follows:

Start

  • 3...a6 forces White to decide about the bishop. Taking on c6 is the Exchange Variation; retreating keeps the pressure.
  • 4.Ba4 keeps the bishop aimed at c6 and e8. 4...Nf6 counterattacks e4.
  • 5.O-O works because 5...Nxe4 leads to the Open Variation, where d4 and Re1 regain the pawn. 5...Be7 prepares to castle.
  • 6.Re1 defends e4, so now Bxc6 and Nxe5 really is a threat. 6...b5 ends it by driving the bishop away.
  • 7.Bb3 puts the bishop on the a2–g8 diagonal. 8.c3 prepares d4 and gives the bishop a retreat on c2.
  • 9.h3 stops ...Bg4, which would pin the knight and pressure d4. Now d4 comes with the center fully supported.

After 9.h3 Black picks a system. In the Chigorin (9...Na5 10.Bc2 c5 11.d4) Black kicks the bishop and fights for d4 on the queenside. In the Breyer (9...Nb8 10.d4 Nbd7) the knight reroutes to d7 to support e5 and free the c-pawn. In the Zaitsev (9...Bb7 10.d4 Re8) Black piles on e4 and keeps the pieces flexible. This suits players who like long strategic fights.

Berlin Defense: 3...Nf6

The Berlin Defense ignores the bishop and counterattacks e4 at once. The main line trades queens by move 8:

Start

This is the "Berlin endgame." Black's king has lost castling rights and Black has doubled c-pawns, but Black owns the bishop pair and has no real weaknesses. Stockfish rates the final position only +0.14 (depth 20). White plays with the healthy kingside majority; Black holds, then uses the bishops. It suits solid, patient players as Black.

Marshall Attack: 7...O-O 8.c3 d5

Instead of 7...d6, Black castles and, after 8.c3, sacrifices a pawn with 8...d5:

Start

Black is a pawn down but gets ...Bd6, ...Qh4 and a kingside attack while White's queenside is still undeveloped. Stockfish 17.1 gives +0.56 (depth 20) after 11...c6, with 12.Re1 Bd6 13.d4 Qh4 14.g3 Qh3 as its main line: White keeps the pawn, Black keeps the initiative. It suits well-prepared attackers as Black, because one inaccuracy on either side is fatal.

Many White players avoid it with the Anti-Marshall 8.a4, pressuring b5 before Black can play ...d5. Stockfish rates 8.a4 at +0.31 (depth 20), close to the main line.

Open Variation: 5...Nxe4

Black takes the e4 pawn and keeps it only long enough to free the game:

Start

Black gets active pieces and a strong knight on e4; White gets a space-gaining pawn on e5 and targets the isolated-looking d5 pawn. Stockfish gives +0.41 (depth 20), with 9.c3 as its first choice. It suits Black players who want open, active positions without the Marshall's pawn sacrifice.

Exchange Variation: 4.Bxc6

White gives up the bishop pair to damage Black's pawns:

Start

White's long-term trump is the kingside majority (four pawns against three), which can produce a passed pawn in the endgame. Black's compensation is the two bishops and quick development. Stockfish rates the position after 7...c5 at +0.20 (depth 20). It suits White players who like simple endgames and want to avoid main-line theory. Remember that 5.O-O, not 5.Nxe5?, is the point: after 5.Nxe5? Qd4! Stockfish already prefers Black (−0.56, depth 20).

Classical and Schliemann Defenses

Two sharper alternatives on move 3: the Classical Defense 3...Bc5, where Black develops actively (4.O-O Nd4 5.Nxd4 Bxd4 6.c3 Bb6 7.d4 gives White the center, +0.43 at depth 20), and the Schliemann 3...f5, a counter-gambit. Against the Schliemann, 4.Nc3 is the main answer; Stockfish rates it +0.38 (depth 20), with 4...fxe4 5.Nxe4 as Black's only good reply. Other fourth moves for Black score close to +1.

Start

Main Ruy Lopez variations at a glance
VariationMovesCharacter
Closed (Morphy)3...a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6Slow, strategic, long maneuvering
Berlin Defense3...Nf6 4.O-O Nxe4 5.d4 Nd6Solid, early queen trade
Marshall Attack7...O-O 8.c3 d5Pawn sacrifice, Black attacks
Open Variation5...Nxe4 6.d4 b5 7.Bb3 d5Open, active piece play
Exchange Variation4.Bxc6 dxc6Structural, endgame-oriented
Schliemann3...f5Sharp counter-gambit

Plans for White

  • Build the d4 center. c3 then d4, supported by Re1 and h3, is the core plan. Push d4–d5 when Black's pieces are stuck on the queenside, closing the center and freeing the kingside.
  • The knight maneuver. Nb1–d2–f1–g3 (or e3) brings the queen's knight to the kingside, where it eyes f5 and h5. This is the classic Ruy Lopez plan for a kingside attack.
  • Keep the bishop alive. The bishop belongs on b3 or c2. Play c3 early so it always has a retreat from ...Na5 or ...c4.
  • Pressure the queenside. a4 attacks the b5 pawn and opens the a-file for the rook, as in the Anti-Marshall and many Closed lines.

Plans for Black

  • Hold e5. Black's position stands on the e5 pawn. Pieces like ...Re8, ...Bf8 (Zaitsev) or ...Nd7 (Breyer) keep it safe.
  • Queenside expansion. ...Na5, ...c5 and sometimes ...c4 gain space and fight White's d4. The risk is the knight on a5 getting stranded.
  • Counter-strike in the center. ...d5 (Marshall, Open Variation) or ...exd4 followed by piece pressure on e4 stops White from building a perfect center.
  • Trade into a good endgame. In the Berlin, the bishop pair is the long-term trump; keep the position closed until the bishops have open lines.

Traps to know

Noah's Ark Trap

This trap catches White when Black plays the solid 4...d6:

Start

The mistake is 8.Qxd4?, which looks natural because it regains the pawn. Black answers 8...c5!, threatening ...c4, which traps the bishop on b3 behind Black's pawn chain. Stockfish evaluates the position after 8.Qxd4 at −2.20 (depth 20), with 8...c5 as the clear best move; the nearest alternative, 8...Nf6, is only −0.04. Instead of 8.Qxd4, play 8.a4, which Stockfish rated +0.16 in our earlier depth-20 run, or 8.c3. The lesson: the b3 bishop needs a retreat square, which is why White plays c3.

Fishing Pole Trap

This one punishes White for greed in the Berlin:

Start

4...Ng4 is a bad move: after 5.h3 Stockfish rates White +1.25 (depth 20). But 5...h5 baits the knight. 6.hxg4? opens the h-file for Black's rook and queen; Stockfish already scores it −2.30. After 7.Ne1? Black has a forced mate (Stockfish finds mate in 4 starting 7...Qh4), and after 8.f3 g3 the threat of ...Qh2 or ...Qh1 mate cannot be met (Stockfish: mate in 2 after 8.f3). To avoid it, simply do not take: after 5...h5, Stockfish prefers 6.Ba4, 6.d4 or 6.c3, all around +1.3.

How to play against the Ruy Lopez

As Black, choose by temperament. The Berlin (3...Nf6) is the lowest-risk answer and the one elite players use when they need a draw-proof position. The Morphy Defense (3...a6) keeps the full middlegame fight, and from there the Marshall Attack is the most aggressive choice. Club players who do not want to learn theory can play 3...a6 4.Ba4 d6, a Steinitz Deferred setup that sets the Noah's Ark Trap and keeps a solid center.

Practical tips: keep e5 protected, never play ...Na5 without a follow-up for the knight, and watch for White's knight reaching f5 in the Closed lines. If you prefer to avoid the Ruy Lopez entirely, 2...Nf6 (the Petrov) prevents it.

Engine verdict

We ran Stockfish 17.1 (single-threaded lite build) on every key position at depth 20, White's point of view:

  • After 3.Bb5, the top three replies are 3...a6 +0.40, 3...Nf6 +0.45 and 3...Bc5 +0.49. In the original lesson's MultiPV 5 run, 3...a6 and 3...Nf6 both scored +0.34; small differences between runs are normal engine noise.
  • The Closed main line after 9.h3: +0.34. Chigorin after 11.d4: +0.61. Breyer after 10...Nbd7: +0.58. Zaitsev after 10...Re8: +0.42.
  • Marshall after 11...c6: +0.56. Anti-Marshall 8.a4: +0.31. Open Variation after 8...Be6: +0.41.
  • Berlin endgame: +0.14. Exchange after 7...c5: +0.20.

Every serious line stays between +0.1 and +0.6: White keeps a small, stable edge, and nothing more. The Berlin endgame is the closest to equal, which is exactly why it became Black's favorite drawing weapon.

History

The opening is named after Ruy López de Segura, a 16th-century Spanish priest who analyzed it in his chess book Libro del Axedrez, written in 1561 (Wikipedia). The Morphy Defense 3...a6 is named after Paul Morphy, and the Marshall Attack after Frank Marshall, who introduced it against José Raúl Capablanca in 1918; Capablanca won that game. The Berlin Defense returned to the top level when Vladimir Kramnik used it against Garry Kasparov in their 2000 World Championship match, which Kramnik won.

Frequently asked questions

Is the Ruy Lopez good for beginners?

Yes, if you learn the plans rather than long lines. The moves are natural (develop, castle, c3 and d4), and the main danger, the bishop getting trapped on b3, is easy to remember. If you want quick attacking chances, the Italian Game or the Vienna Game gets you there faster.

What is the Berlin Defense?

The Berlin Defense is 3...Nf6 against the Ruy Lopez. Black counterattacks e4 instead of playing 3...a6, and the main line trades queens early into the "Berlin endgame," where Black is very hard to beat. Stockfish rates the Berlin endgame at only +0.14.

What is the best reply to the Ruy Lopez?

Stockfish 17.1 at depth 20 rates 3...a6 (Morphy Defense) and 3...Nf6 (Berlin Defense) as the two best replies, within a few hundredths of a pawn of each other. Choose 3...a6 for a full middlegame fight and 3...Nf6 for solidity.

Why is it called the Spanish Opening?

Because Ruy López de Segura, who wrote about it in 1561, was Spanish. "Spanish Opening," "Spanish Game" and "Ruy Lopez" all mean the same opening.

Is the Ruy Lopez better than the Italian Game?

Neither is objectively better; both give White a small edge. The Ruy Lopez puts more long-term pressure on e5, while the Italian aims the bishop straight at f7 and reaches open positions more often.

Drill the main lines with the trainer at the top of this page, test your own ideas on the analysis board, and play the positions out against the computer in play chess. Then compare the Ruy Lopez with the other 1.e4 e5 openings: the Italian Game, the Scotch Game and the Vienna Game.