Chess Openings Lab
a8b7c6d5e4f3g2h1

King's Gambit Accepted: Hanstein Gambit

The Hanstein Gambit is the King's Gambit Accepted line 3.Nf3 g5 4.Bc4 Bg7 5.O-O, where White castles at once instead of attacking the g5 pawn. White hopes the open f-file and the c4 bishop will hit f7, while Black keeps the extra pawn and builds a solid kingside chain.

Moves
1.e4 e5 2.f4 exf4 3.Nf3 g5 4.Bc4 Bg7 5.O-O
ECO
C38
Engine
−1.32 · a clear edge for Black (Stockfish 17.1, depth 20)
Played
183 games in our lichess sample
White scores
39.9%

Key ideas for both sides

White

  • Play d4 and c3, as in every top engine line, so the center is solid before any piece sacrifice on f4 or g5.
  • Strike at the g5 pawn with h4. If Black answers ...h6, the chain holds, but the h-file and g4 square can loosen.
  • Keep the rook on f1 and the bishop on c4 aimed at f7; both pieces want the f-file to open.
  • Gain queenside space with a4 or b4 while Black is busy with ...Nc6 and ...Qe7.

Black

  • Start with 5...d6, the engine choice: it frees the c8 bishop and covers e5 against a later d4-d5 or e5 push.
  • Support the g5 pawn with ...h6 so that h4 can be met without giving up the f4 pawn.
  • Bring the knight to c6 and the queen to e7, putting pressure on d4 and e4 before castling.
  • The g7 bishop already eyes d4 and b2. Keep it there and avoid trading it for a knight.

Plans and pawn structure

The pawns on f4 and g5 shut the f1 rook out of play. White has to pry them loose with h4 and maybe g3, or the gambit pawn is simply gone. Black's plan is calm: ...d6, ...h6, ...Nc6 and ...Qe7, then castle long or keep the king in the center behind the pawn wall. Once Black's pieces are out, the extra pawn plus the strong g7 bishop leave White short of targets. White's best practical chance is to open lines fast with d4, h4 and c3 before Black is fully organized.

What the engine plays from here

Stockfish 17.1 at depth 20 rates the position −1.32: a clear edge for Black. Its three top choices for Black:

  1. −1.32 5...d6 6.d4 h6 7.h4 Nc6 8.c3
  2. −1.30 5...h6 6.d4 d6 7.h4 Nc6 8.c3
  3. −1.26 5...Nc6 6.d4 d6 7.c3 h6 8.h4

Pawns, from White's side.

How it scores on lichess

183 rated lichess games reached this position; White scored 39.9%.

1600–199939.4%
2000 and up44.4%

Light: White wins. Grey: draws. Dark: Black wins. About the sample.

How to play against it

With Black, keep the extra pawn and do not hurry. Play ...d6 and ...h6 first, then ...Nc6 and ...Qe7. Avoid opening the f-file yourself with ...f6 or ...gxh4 too early, which gives the f1 rook and c4 bishop the lines they want. Your king is safe behind the f4-g5 chain for a long time.

Questions

What are the moves of the King's Gambit Accepted: Hanstein Gambit?

The King's Gambit Accepted: Hanstein Gambit starts 1.e4 e5 2.f4 exf4 3.Nf3 g5 4.Bc4 Bg7 5.O-O. Its ECO code is C38.

Is the King's Gambit Accepted: Hanstein Gambit good for White?

Stockfish 17.1 rates the position −1.32 at depth 20, which is a clear edge for Black. A gamble for attacking White players who want quick development, but a calm Black player who supports g5 keeps a healthy extra pawn.

What is the main idea of the King's Gambit Accepted: Hanstein Gambit?

White gives a pawn and castles early so the f1 rook and c4 bishop can attack f7. Black keeps the pawn with ...d6, ...h6 and ...Nc6, and the solid g5-f4 chain usually holds.

What should Black play next?

The engine's first choice is d6, with h6 and Nc6 close behind. 5...d6 opens the c8 bishop and covers e5, the first step before ...h6 and ...Nc6 consolidate the pawn.

Updated October 2026. Sources and method.