Ruy Lopez: The Spanish Opening Explained: Main Lines, History, and Strategy

The Ruy Lopez (1.e4 e5 2.Nf3 Nc6 3.Bb5) has been the most-played e4 opening at championship level for over 150 years. Berlin Defense, Morphy Defense, Marshall Attack, what each variation is and why.

Chess board showing the Ruy Lopez position after 1.e4 e5 2.Nf3 Nc6 3.Bb5
The Ruy Lopez position after move 3. White's bishop on b5 pins the knight that defends the e5 pawn. Not winning it immediately, but establishing long-term pressure that can persist for 40 moves. — via Wikimedia Commons. CC BY-SA 4.0.

The Ruy Lopez is 1.e4 e5 2.Nf3 Nc6 3.Bb5. White’s bishop attacks the knight that defends the e5 pawn. The threat isn’t immediate, Black can defend the pawn, but the pressure that bishop creates persists through the middlegame and endgame. That’s why the Ruy Lopez has been the most-played continuation after 1.e4 e5 at the championship level for over 150 years.

Bobby Fischer played it almost exclusively as White. Garry Kasparov built major championship preparation around it. Magnus Carlsen plays it today. The opening is named for a Spanish bishop who wrote about it in 1561, and it’s still the most theoretically dense e4 opening in chess.

History

Ruy López de Segura was a Spanish priest who wrote Libro de la invencion liberal y arte del juego del axedrez in 1561: the first systematic chess opening treatise. He analyzed 1.e4 e5 2.Nf3 Nc6 3.Bb5 and argued that this bishop move would win Black’s e-pawn. He was wrong about the immediate win, but correct about the long-term pressure. The name stuck.

By the late 19th century it was standard at the championship level. Steinitz played it. Lasker played it. Capablanca’s 1927 title match with Alekhine, which Capablanca lost after eight years between defeats, was substantially contested in the Spanish.

The main variations

Berlin Defense: 3…Nf6

Black attacks White’s e4 pawn immediately. The main line: 4.0-0 Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8. Queens are exchanged on move 8. Black’s king can’t castle for the rest of the game, but the two bishops and solid pawn structure give genuine drawing chances against the best players in the world.

Vladimir Kramnik used this against Kasparov in the 2000 World Chess Championship, drawing with Black in every game. The “Berlin Wall” became synonymous with solidity. The endgame positions are technically demanding: White has slightly better pawn structure and more active piece placement; Black’s bishops compensate if the game reaches an open ending.

Chess board showing the Berlin Defense endgame position after queens are exchanged, with Black's king on d8
The Berlin endgame after 8...Kxd8. Black's king sits on d8 without castling rights, an apparent disadvantage that's offset by solid structure and two bishops. Kramnik held this against Kasparov in every classical game of their 2000 title match. via Wikimedia Commons. CC BY-SA 4.0.

Morphy Defense: 3…a6

Black tests the bishop: take on c6, or retreat? After 4.Ba4 (retreat, maintaining the pin), 4…Nf6 5.0-0 Be7 6.Re1 b5 7.Bb3 d6 8.c3 0-0 9.h3 produces the “closed Ruy Lopez”: the most deeply analyzed position in chess. Both sides have made natural developing moves; the real game starts at move 10 with pawn structures settled and both kings safe.

White’s plan: push d4, expand in the center, generate queenside space with a4. Black’s plan: …Na5 to eliminate the Bb3, …c5 to contest the center, counterplay down the c-file. The position rewards preparation and precise piece coordination over the course of 40-50 moves.

Fischer’s closed Spanish games are reference texts. His 1992 rematch with Spassky (unofficial match) contains Spanish endgames that hold up as instructional material today. Logical Chess: Move by Move (affiliate) by Irving Chernev includes annotated Spanish games, the explanations of why each move is made are the best introduction to the structural logic.

Marshall Attack

After 3…a6 4.Ba4 Nf6 5.0-0 Be7 6.Re1 b5 7.Bb3 0-0 8.c3 d5, Black sacrifices the d-pawn for kingside attacking chances. White takes: 9.exd5 Nxd5 10.Nxe5 Nxe5 11.Rxe5 c6. Black has a pawn deficit and immediate piece activity against White’s king.

Frank Marshall introduced this against Capablanca in 1918 as a surprise weapon. Capablanca refuted it over the board. The attack has been refined since then, and today both sides have sufficient resources if they know the preparation. Games in the Marshall typically end by tactics, one side’s attack lands or doesn’t, rather than the slow positional grinding of the closed variation.

Open Ruy Lopez: 3…a6 4.Ba4 Nf6 5.0-0 Nxe4

Black grabs the e4 pawn immediately. After 6.d4 b5 7.Bb3 d5 8.dxe5 Be6, Black is a pawn ahead but behind in development with a complicated position. White gets active pieces and attacking chances against Black’s relatively exposed center.

Less common at the top level than the Morphy or Berlin, the initiative cedes to White, and the complications favor the better-prepared player. At club level it’s a practical choice precisely because of that: complex positions where knowing the theory matters.

Why top players choose it

The Ruy Lopez produces positions where both sides have clear plans, the middle and endgame require real chess understanding, and preparation matters without being everything. It’s not a quick-knock weapon. Players who choose it accept that the game will be decided by chess over many moves.

Carlsen plays both colors of the Spanish routinely. His wins frequently come in the endgame. Converting small positional advantages that opponents correctly evaluated as drawable but couldn’t hold for 60 more moves. His 2018 championship match with Fabiano Caruana featured several Spanish games, all drawn, demonstrating that at the absolute top level, the positions are genuinely balanced.

Compare the Sicilian Defense: the Sicilian gives Black immediate counterplay and asymmetric pawn structures from move 1. The Spanish gives White structural pressure that may take 40 moves to convert. Different risk tolerances, different opening choices.

How to actually study it

Understand the structure before memorizing lines. In the closed Spanish, the contest is between White’s central control and queenside space versus Black’s c-file counterplay and bishop pair. Know what each side is trying to do, then learn the move orders that follow from those ideas.

Under 1600 ELO: 10 moves of theory is enough. Know why 3…a6 is the most common response, what both sides’ main plans are, where pieces should go. Don’t memorize 25-move lines that require your opponent’s cooperation. Play the ideas.

Silman’s How to Reassess Your Chess (affiliate) covers the positional imbalances that define Ruy Lopez structures, not a Spanish-specific book, but the framework applies directly to every decision in the closed variation. See also our chess improvement guide for when to prioritize opening study vs. tactics and endgames.

Frequently asked questions

What is the Ruy Lopez in chess? An opening that begins 1.e4 e5 2.Nf3 Nc6 3.Bb5. Also called the Spanish Opening or Spanish Game. White’s bishop pins the knight defending e5, creating long-term pressure. The most analyzed and most-played e4 continuation at championship level.

Is the Ruy Lopez good for beginners? It teaches correct principles (develop pieces, control the center, castle) but the main lines run deep. Playing 3.Bb5 is fine at any level; avoid trying to memorize the 25-move closed variation before understanding the ideas behind it.

What is the Berlin Defense? 3…Nf6, attacking e4. After 4.0-0 Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8, queens are exchanged early. The resulting endgame is extremely solid for Black. Kramnik used it to beat Kasparov in their 2000 world championship match without losing a classical game.

Why is it called the Ruy Lopez? Named for Ruy López de Segura, a 16th-century Spanish bishop who analyzed the position in his 1561 chess treatise: the earliest systematic opening analysis in chess literature.

What is the Marshall Attack? After 1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0 Be7 6.Re1 b5 7.Bb3 0-0 8.c3 d5, Black sacrifices a pawn for kingside attacking chances. Developed by Frank Marshall and first played in 1918 against Capablanca.

Sources

  • López de Segura, Ruy. Libro de la invencion liberal y arte del juego del axedrez. 1561.
  • Hooper, David, and Kenneth Whyld. The Oxford Companion to Chess. Oxford University Press, 1992.
  • Chernev, Irving. Logical Chess: Move by Move. Batsford. (affiliate)
  • Silman, Jeremy. How to Reassess Your Chess. Siles Press, 4th ed. 2010. (affiliate)

This page contains affiliate links. As an Amazon Associate, DiscussChess earns from qualifying purchases.

Sources

  • López de Segura, Ruy. Libro de la invencion liberal y arte del juego del axedrez. 1561.
  • Hooper, David, and Kenneth Whyld. The Oxford Companion to Chess. Oxford University Press, 1992.

Further reading