Skip to content
Aback Chess
Sponsors

The Ruy Lopez (Spanish Opening): ideas, main lines and traps

The Ruy Lopez (Spanish Opening) explained: why 3.Bb5 works, the Closed Ruy Lopez, the Berlin Defence, the Marshall Attack, the Exchange Variation, plans and traps.

Openings11 min readUpdated

In short

The Ruy Lopez, also called the Spanish Opening, starts 1.e4 e5 2.Nf3 Nc6 3.Bb5. White's bishop attacks the knight that defends e5, building slow pressure on Black's centre rather than making an immediate threat. Black's main answer is 3...a6, the Morphy Defence, which usually leads to the Closed Ruy Lopez. The Berlin Defence (3...Nf6), the Marshall Attack and the Exchange Variation are the other lines every Ruy Lopez player meets. It rewards understanding of plans and pawn structures more than memory.

The Ruy Lopez is one of the oldest openings in chess and still one of the most important. It is named after Ruy López de Segura, a sixteenth-century Spanish priest who wrote about it, which is why it is also called the Spanish Opening, or simply the Spanish. It is played at every level, from club games to world championship matches, and it teaches the ideas that run through all open games: pressure on the centre, slow manoeuvring and a well-timed d4.

1What is the Ruy Lopez?

1.e4 e5 2.Nf3 Nc6 3.Bb5The Ruy Lopez after 1.e4 e5 2.Nf3 Nc6 3.Bb5. The bishop attacks the c6 knight, the piece that defends the e5 pawn.Open on the board

After 1.e4 e5 2.Nf3 Nc6, White's knight attacks e5 and Black's knight defends it. With 3.Bb5, White attacks the defender. The bishop also develops, and White is ready to castle on the next move. Compare it with the Italian Game, 3.Bc4, where the bishop aims at f7: the Spanish bishop puts pressure on the centre instead, and that pressure lasts deep into the middlegame.

2Does 3.Bb5 threaten to win the e5 pawn?

Not yet, and this is the first thing to understand about the Ruy Lopez. If White takes on c6 at once and then grabs the pawn, 4.Bxc6 dxc6 5.Nxe5, Black plays 5...Qd4. The queen attacks the knight on e5 and the pawn on e4 at the same time, and after 6.Nf3 Qxe4+ Black has the pawn back with check and keeps the two bishops. White's e4 pawn is the problem: once it is defended, the threat becomes real.

1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1After 6.Re1 the rook defends e4. Now Bxc6 followed by Nxe5 wins a pawn, because ...Qd4 no longer wins e4 back.Open on the board

That is why Black's main move in this position is 6...b5, chasing the bishop to b3 before White can take on c6. If Black castles instead, 7.Bxc6 dxc6 8.Nxe5 leaves White a clean pawn up. The lesson carries over to every Spanish line: count who defends e4 and e5 before you take or allow anything in the centre.

3What are White's plans in the Ruy Lopez?

  • Build a big centre with c3 and d4. The pawn on c3 supports d4 and gives the bishop a retreat square on c2.
  • Play h3 before d4, so that Black cannot pin the f3 knight with ...Bg4 and add pressure to d4.
  • Reroute the queen's knight: b1, d2, f1 and then g3 or e3, where it eyes f5 and d5. This manoeuvre is the signature of the Closed Ruy Lopez.
  • Use the bishop on b3 or c2. On b3 it looks down the diagonal to f7; on c2 it points at the kingside, often supporting a knight on f5.
  • If the centre closes after d5, attack on the side your pawns point to: usually the kingside, with Nf5, g4 or f4 in some lines, or the queenside with a4 and pressure on b5.

4What are Black's plans in the Ruy Lopez?

  • Hold the e5 pawn. The whole defence rests on keeping a pawn in the centre, so moves such as ...d6, ...Re8 and ...Bf8 are common.
  • Gain space on the queenside with ...a6 and ...b5, which also pushes the bishop away from c6.
  • Challenge the b3 bishop with ...Na5, which is the start of the Chigorin Defence, or reroute the knight with ...Nb8 and ...Nbd7, which is the Breyer Defence.
  • Strike back in the centre with ...c5 or, in some lines, ...d5, ideally when White's pieces are not ready for it.
  • In the sharpest lines, give a pawn for the initiative, as in the Marshall Attack.

5The Closed Ruy Lopez

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.h3The Closed Ruy Lopez after 9.h3. White is ready for d4; h3 stops ...Bg4. Black now picks a plan: ...Na5, ...Nb8 or ...Bb7.Open on the board

The Closed Ruy Lopez is the main line: 3...a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O 9.h3. Both sides have castled, the pawns on e4 and e5 face each other, and the fight is about the centre and the timing of d4. Black's ninth move chooses the plan. With 9...Na5 and ...c5, the Chigorin Defence, Black trades space on the queenside for pressure on d4. With 9...Nb8, the Breyer Defence, the knight goes back to come again via d7, where it supports e5 and frees the c-pawn. With 9...Bb7, which the opening book calls the Flohr System, Black adds pressure to e4 before deciding.

These positions are slow. Neither side can win by force in the opening, and the player who understands the plans usually outplays the one who only knows the moves. That is the reputation of the Ruy Lopez: a long fight in which small advantages grow.

6The Marshall 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 d5The Marshall Attack after 8...d5. Black offers the e5 pawn to open lines towards White's king.Open on the board

Instead of 7...d6, Black can castle first and answer 8.c3 with 8...d5. After 9.exd5 Nxd5 10.Nxe5 Nxe5 11.Rxe5 Black is a pawn down, but White's queenside pieces are still at home and Black's pieces flood towards the kingside. Frank Marshall introduced the gambit against José Raúl Capablanca in 1918, and it has been tested deeply ever since. The theory runs long, so many White players avoid it with 8.a4 or 8.h3 before c3; the opening book names 8.a4 the Anti-Marshall.

7The Berlin Defence

1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.O-O Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8The Berlin endgame after 8...Kxd8. Queens are off, Black's king cannot castle and Black has doubled c-pawns, but also the two bishops.Open on the board

The Berlin Defence is 3...Nf6, attacking e4 at once. After 4.O-O Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8, the queens come off on move eight. The opening book calls this position the Berlin Wall Defence; players usually call it the Berlin endgame. White has a healthy kingside pawn majority and the e5 pawn gains space. Black has the bishop pair, a solid position and doubled c-pawns that make the queenside majority hard to use. Vladimir Kramnik used it in his 2000 world championship match against Garry Kasparov, which he won, and it has been a top-level weapon ever since.

Many White players avoid the endgame with 4.d3, which the book calls the Anti-Berlin Variation. It keeps the queens on and leads to slower positions closer to the Italian Game.

8The Exchange Variation and the Open Ruy Lopez

1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Bxc6 dxc6The Exchange Variation after 4...dxc6. Black has doubled c-pawns and the bishop pair. Once White trades the d-pawn for Black's e-pawn, White will have four pawns against three on the kingside.Open on the board

In the Exchange Variation, 4.Bxc6 dxc6, White gives up the bishop at once. The idea is structural: after d4 and an exchange of the d-pawn for the e-pawn, White has four pawns against three on the kingside, while Black's four against three on the queenside includes doubled pawns and is hard to turn into a passed pawn. White often aims for an endgame. Black's answer is activity: the two bishops and open lines for the pieces. After 5.O-O, Black can defend e5 with 5...f6, the Gligoric Variation in the book.

In the Open Ruy Lopez, Black takes the e4 pawn with 5...Nxe4 instead of 5...Be7. White wins it back after 6.d4 b5 7.Bb3 d5 8.dxe5 Be6, and the result is a sharp position in which Black's pieces are active but the pawn structure is looser. It suits players who prefer piece play to the slow Closed lines.

9Other Black third moves

MoveName in the bookIdea
3...a6Morphy DefenceAsk the bishop at once; the main line
3...Nf6Berlin DefenceCounterattack e4; often a solid endgame
3...f5Schliemann DefenceA sharp gambit-style counterattack against e4
3...Bc5Classical VariationDevelop actively and aim at f2
3...d6Steinitz DefenceHold e5 solidly with a pawn, at the cost of space
3...Nd4Bird VariationTrade the f3 knight; an old and rare try
Names as the opening book gives them after 1.e4 e5 2.Nf3 Nc6 3.Bb5.

10Pawn structures in the Ruy Lopez

Three structures come up again and again. In the closed centre, White plays d4 and later d5, and Black keeps a pawn on e5: the centre locks, White usually plays on the kingside and Black on the queenside with ...c5 and ...c4. In the open centre, the pawns on d4 and e5 are exchanged, the e-file and d-file open, and piece activity decides. In the Exchange structure, the doubled c-pawns stay for the whole game, which is why many Exchange Variation games are decided in the endgame. Recognise which structure you are in and the right plan usually follows.

11Ruy Lopez traps you should know

1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.d3 Ne7 5.Nxe5 c6The Mortimer Trap after 5.Nxe5 c6. The bishop must move, and 6...Qa5+ then checks the king and attacks the knight on e5.Open on the board

The Mortimer Trap comes from the Anti-Berlin: 3...Nf6 4.d3 Ne7 looks like a mistake that drops e5, but 5.Nxe5? c6 attacks the bishop, and after it moves, 6...Qa5+ gives check along the a5-e1 diagonal and hits the knight along the fifth rank. White blocks the check and Black takes the knight. The lesson: when your opponent seems to leave a pawn loose, look for the queen check that follows.

1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 b5 5.Bb3 d6 6.d4 Nxd4 7.Nxd4 exd4 8.Qxd4 c5 9.Qd5 Be6 10.Qc6+ Bd7 11.Qd5 c4The Noah's Ark Trap after 11...c4. The b3 bishop is attacked; its only moves, Ba4 and Bxc4, both lose it to the b5 pawn.Open on the board

The Noah's Ark Trap catches White when the queen recaptures on d4 too early. After 8.Qxd4? c5, the queen must move, and ...c4 traps the bishop on b3 behind White's own pawns on a2 and c2. White can get a pawn for it at most, so a piece is lost. The fix is simple: with Black's pawns on a6 and b5, watch for ...c5 and ...c4 whenever your bishop sits on b3.

The third trap is the one from earlier: in the Exchange Variation, 5.Nxe5? Qd4 wins the pawn back with a good position for Black. It catches White players who assume that taking on c6 means e5 is free.

12Common beginner mistakes in the Ruy Lopez

  • Taking on c6 and then on e5 too early. Until e4 is defended, ...Qd4 or ...Nxe4 wins the pawn back.
  • Forgetting h3 in the Closed lines. Without it, ...Bg4 pins the f3 knight and adds pressure to d4.
  • Playing d4 before you are ready. Push it with c3 played and the e4 pawn defended, or the centre can collapse.
  • As Black, leaving the bishop on b3 unchallenged while the f7 square is weak. The diagonal from b3 to f7 decides many short games.
  • As Black, castling into 6.Re1 without 6...b5. Count the defenders of e5 first.
  • Learning the Closed main line and nothing else. Prepare an answer to the Berlin, the Marshall and the Exchange before the deep theory.

13Who should play the Ruy Lopez?

The Ruy Lopez suits players who enjoy long, strategic games: building a position, manoeuvring pieces and squeezing small advantages. It is not a quick-win opening, and the main lines contain a lot of theory, so many coaches suggest the Italian Game first and the Spanish once you understand the open games. With Black, meeting the Ruy Lopez is part of playing 1...e5, so every 1...e5 player needs a plan against it, even a simple one such as the Berlin or the Closed Breyer.

14How to practise the Ruy Lopez

Build your lines on the Repertoire page. With Black, the 1...e5 against 1.e4 course already covers the Closed Ruy Lopez with the Breyer Defence and the Exchange Variation with 5...f6. With White, there is no Ruy Lopez course yet, so start empty or from your own games and add your answers to the Berlin, the Marshall and the Open lines first. The trainer then quizzes you on each position with spaced repetition, and checks your recent games against what you have saved.

Play the opening against a computer opponent too: Aiko, one of the bots on the Play page, opens with the Ruy Lopez as White. Afterwards, open the game in Game Review. It names the opening, marks theory moves as Book, and shows where you left the book and what the move cost.

Repertoire

Keep your Ruy Lopez moves by position, check your recent games against them and drill them with spaced repetition.

Frequently asked questions

Why is the Ruy Lopez called the Spanish Opening?

It is named after Ruy López de Segura, a Spanish priest who wrote about the opening in the sixteenth century. Outside the English-speaking world it is usually called the Spanish Game or simply the Spanish.

Is the Ruy Lopez good for beginners?

It is sound and teaches good habits, but its main lines are long and strategic. Many players learn the Italian Game first, then move on to the Ruy Lopez once they are comfortable with open positions and the fight for d4.

What is the best defence against the Ruy Lopez?

There is no single best defence. The Morphy Defence (3...a6) leads to the rich Closed lines, while the Berlin Defence (3...Nf6) is known for its solidity. Pick the one whose positions you understand and enjoy.

What is the Marshall Attack?

It is a gambit for Black in the Closed Ruy Lopez: after 7...O-O 8.c3, Black plays 8...d5 and gives the e5 pawn to attack White's king. White can avoid it with 8.a4 or 8.h3 before playing c3.

What is the Berlin Wall?

It is the endgame that arises from the Berlin Defence after 4.O-O Nxe4 5.d4 Nd6 6.Bxc6 dxc6 7.dxe5 Nf5 8.Qxd8+ Kxd8. Queens are traded early, and Black relies on the bishop pair and a solid structure.

What is the difference between the Ruy Lopez and the Italian Game?

Both start 1.e4 e5 2.Nf3 Nc6. In the Ruy Lopez the bishop goes to b5 and pressures the knight that guards e5; in the Italian Game it goes to c4 and aims at f7. The Ruy Lopez tends to lead to slower, more strategic play.