Chess OpensOpen the trainer
1.Article

Ruy Lopez: The Complete Guide to the Spanish Opening

Learn the Ruy Lopez (1.e4 e5 2.Nf3 Nc6 3.Bb5): the Closed main line, Exchange, Berlin, Marshall and Open variations, plus White's plans and key traps.

By
Chess Opens
Published
Reading time
4 min
2.Read

In short

  1. The Ruy Lopez (3.Bb5) pressures the c6 knight, the main defender of e5, creating long-term pressure on Black's center.
  2. The Closed main line (3...a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O 9.h3) is one of the deepest positions in chess.
  3. White's plan: c3 and d4 for a big center, h3 to stop ...Bg4, and the Nbd2–f1–g3 maneuver.
  4. Black's main alternatives are the Berlin (3...Nf6), the Marshall Attack (...d5 gambit) and the Open Variation (5...Nxe4).

The Ruy Lopez, also called the Spanish Opening, is one of the oldest openings in chess and one of the most respected. It’s been played in more world championship matches than almost any other 1.e4 opening, and it’s still the main battleground of 1.e4 e5 at the top level.

After 1.e4 e5 2.Nf3 Nc6 3.Bb5, White’s bishop attacks the knight that defends e5. It’s not an immediate threat, but it creates pressure that lasts deep into the middlegame.

The Ruy Lopez: the bishop pressures the c6 knight, the defender of e5.8a7b6c5d4e3f2g1h
The Ruy Lopez: the bishop pressures the c6 knight, the defender of e5.1.e4 e5 2.Nf3 Nc6 3.Bb5

Why 3.Bb5 works

Compare it with the Italian Game (3.Bc4), which aims at f7. The Ruy Lopez aims at something more strategic: the e5 pawn, by way of its defender on c6. If White can ever play Bxc6 and Nxe5, or build a center with d4 that makes e5 hard to hold, Black is under pressure. This slow, constant pressure is what makes the Ruy Lopez so hard to equalize against.

The main line: Morphy Defense and the Closed Ruy

Almost everyone answers with 3…a6, the Morphy Defense, asking the bishop what it wants. White usually keeps it with 4.Ba4.

The Closed Ruy Lopez after 9.h3: one of the most deeply studied positions in chess.8a7b6c5d4e3f2g1h
The Closed Ruy Lopez after 9.h3: one of the most deeply studied positions in chess.1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O 9.h3

Move by move:

  • 4…Nf6 develops and attacks e4.
  • 5.O-O ignores the attack. If 5…Nxe4, White regains the pawn with Re1 or d4.
  • 5…Be7 6.Re1 protects e4. Now Bxc6 and Nxe5 is a real threat.
  • 6…b5 7.Bb3 removes the threat; the bishop now eyes f7 from b3.
  • 7…d6 8.c3 O-O 9.h3 prepares d4 and stops …Bg4.

You can step through this whole line, with every move explained, on the Ruy Lopez page.

White’s plans in the Closed Ruy

  1. The d4 break. With c3, h3 and Re1 in place, White plays d4 to build a big center.
  2. The knight maneuver. Nb1–d2–f1–g3 (or e3) brings the queenside knight to the kingside, just like in the Italian.
  3. The bishop on c2. After …Na5, the b3 bishop often retreats to c2, where it stays aimed at the kingside.
  4. Queenside play with a4. Hitting the b5 pawn opens the a-file for White’s rook.

The Exchange Variation: 4.Bxc6

White can give up the bishop immediately: 4.Bxc6 dxc6 5.O-O. Black gets the bishop pair; White gets a better pawn structure. White’s 4-vs-3 kingside majority can create a passed pawn in the endgame, while Black’s doubled c-pawns make that harder on the queenside.

The Exchange Variation: White aims for an endgame where the healthy kingside majority matters.8a7b6c5d4e3f2g1h
The Exchange Variation: White aims for an endgame where the healthy kingside majority matters.1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Bxc6 dxc6 5.O-O f6 6.d4 exd4 7.Nxd4

It was a favorite of Bobby Fischer. It’s simpler than the Closed Ruy and a good choice if you like endgames. The trainer covers it as its second line: learn the Exchange Variation.

The Berlin Defense: 3…Nf6

Black’s most solid reply at the top level. After 3…Nf6 4.O-O Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8, the queens are off by move eight: the famous Berlin endgame.

The Berlin endgame: Black has lost the right to castle but has the bishop pair and a very solid position.8a7b6c5d4e3f2g1h
The Berlin endgame: Black has lost the right to castle but has the bishop pair and a very solid position.1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.O-O Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8

Vladimir Kramnik used it to take the world title from Garry Kasparov in 2000. It’s extremely solid but requires real endgame understanding. Learn it on the Berlin Defense page. Many White players avoid it with 4.d3, keeping the queens on.

The Marshall Attack

In the Closed Ruy, Black can sacrifice a pawn for a fierce kingside attack: 7…O-O 8.c3 d5!?. After 9.exd5 Nxd5 10.Nxe5 Nxe5 11.Rxe5, Black’s pieces swarm toward White’s king.

The Marshall Attack: 8...d5 sacrifices a pawn for rapid development and an attack.8a7b6c5d4e3f2g1h
The Marshall Attack: 8...d5 sacrifices a pawn for rapid development and an attack.1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 O-O 8.c3 d5

The Marshall is so well respected that many White players avoid it with 8.a4 or 8.h3 instead of 8.c3.

The Open Variation: 5…Nxe4

Black grabs the e4 pawn: 5.O-O Nxe4 6.d4 b5 7.Bb3 d5. Black gets active pieces and an open game, at the cost of a slightly loose position. It’s a good choice for Black players who dislike the slow Closed Ruy.

Other Black defenses

  • 3…d6 (Old Steinitz): solid but passive.
  • 3…Bc5 (Classical): active, with ideas of …Nd4.
  • 3…Nd4 (Bird’s Defense): offbeat; 4.Nxd4 exd4 5.O-O is good for White.
  • 3…a6 4.Ba4 d6 (Modern Steinitz): flexible, with tricky lines like the Noah’s Ark trap, where Black traps White’s bishop with …c5 and …c4. Learn it in Ruy Lopez traps.

Is the Ruy Lopez right for you?

The Ruy Lopez is right for you if you enjoy long strategic games and want an opening you’ll never outgrow. It’s harder to learn than the Italian, and Black has very solid defenses like the Berlin. We compare them in Italian vs Ruy Lopez and weigh it up in Ruy Lopez pros and cons. If you meet it as Black, read how to play against the Ruy Lopez.

Practice it

Play both lines from memory on the Ruy Lopez page, then try the Berlin from Black’s side on the Berlin page. For more on the opening’s long history, see Wikipedia’s Ruy Lopez article.

Practice it in Chess Opens

Learn the Ruy Lopez move by move

Step through the Ruy Lopez with the reason behind every move, then play it from memory against the trainer. Free, no sign-up.

Also in this article: Berlin Defense

Questions

Q1Why is it called the Ruy Lopez?

It's named after Ruy López de Segura, a 16th-century Spanish priest who analyzed it in his 1561 book on chess. That's also why it's called the Spanish Opening or Spanish Game.

Q2Is the Ruy Lopez good for beginners?

It's a great opening to learn from, but it's more complex than the Italian Game. Beginners often do better starting with the Italian and adding the Ruy Lopez once they understand slow maneuvering and pawn structures.

Q3Does 3.Bb5 threaten to win a pawn?

Not immediately. After 3...a6 4.Bxc6 dxc6 5.Nxe5, Black regains the pawn with 5...Qd4 or 5...Qg5. The threat becomes real only after White has castled and played d4 or Re1.

3.Next