Position summary (Black to move)
White is a pawn up (6 v 5) and has bishop vs knight, with a strong-looking centre (d4/e4). Black's compensation lies in the open c-file, the queen on the long a8–h1 diagonal (eyeing e4), and White's slightly loose d4/e4 pawns.
The move 21...Kg7
Legality/safety: it's perfectly safe. The g2-bishop is blocked by its own e4-pawn, the d2-queen has no route to g7, and the f1-rook is blocked by f2. There's no tactical refutation (e.g. Qh6+ just loses the queen to Kxh6, and Qc3+ is impossible because d4 blocks the diagonal).
Purpose: it's a "tidy-up" move – getting off the back rank, avoiding future back-rank issues, and perhaps preparing ...h5 or freeing the f8-rook. There's nothing wrong with the idea in the abstract.
Why it's not the best choice here
Black is a pawn down, and in such positions you need to create problems for the opponent rather than spend a tempo on prophylaxis. Kg7 does nothing about White's main plan of advancing the centre (e5 or d5), which will open the g2-bishop and give White a free hand. After 21...Kg7 22.e5! (or 22.d5) White is comfortably better.
Better, more active options:
Verdict
21...Kg7 is a legal and safe move, but it is passive and wastes a tempo at a moment when Black must generate activity to fight for compensation. Not a blunder – more like an inaccuracy (roughly losing half a pawn of evaluation). I'd prefer ...Rc4 or ...Nc6, which put concrete pressure on White's centre.
Based on the analysis of the FEN position q1r2rk1/4n2p/p2pp1p1/8/3PP3/6P1/P2Q1PBP/R4RK1 b - - 0 21, Kg7 is a very good, positionally sound prophylactic move.
Here is a breakdown of why this move makes perfect sense strategically and why it is tactically safe:
g6 and h7, but is missing a dark-squared fianchetto bishop. Because of this, the dark squares around Black's king (specifically f6 and h6) are noticeably weak. d2, eyeing the h6 square. If Black plays a careless move, White would love to play Qh6, creating annoying mating nets or preparing a kingside pawn storm (like h4-h5). h6 and f6, outright preventing White from invading with Qh6. e5 or d5), but Black is well-equipped to handle them:e5 Break & Discovered Attack: g2 is staring down the long diagonal at Black's undefended Queen on a8. The only White piece blocking this diagonal is the e4 pawn. If White tries to spring a trap with 2. e5, opening the diagonal to attack the Queen, Black has two very comfortable replies:g2 bishop entirely.d5 Break: Qd4+) because Black's knight can just block or move, and the dark-squared diagonals pose no threat to the King on g7 since White only has a light-squared bishop.Qh6), and creates no tactical weaknesses.Let's analyze the move Kg7 in the given FEN position:
FEN: q1r2rk1/4n2p/p2pp1p1/8/3PP3/6P1/P2Q1PBP/R4RK1 b - - 0 21
Would you like a deeper analysis of any alternative moves?
21…Kg7 is legal and not an obvious blunder, but it looks unnecessarily risky rather than especially useful. It brings Black’s king closer to potential checks without addressing White’s strong centre.
I’m interpreting the space before P2Q1PBP as a formatting typo.
With Black’s king on g7:
Black can respond with 22…Nc6, saving the knight and attacking d4, so this is not a forced win for White. Nevertheless, White gains activity while Black must attend to threats.
g2–f3–e4–d5–c6–b7–a8
Black must then move the queen or interrupt that diagonal—for example, with …d5 where appropriate. This issue already exists before …Kg7; the king move simply does nothing to address it.
No, Kg7 is a slow, unhelpful king move and not a good choice here.
White is a pawn up with a space advantage from the d4–e4 center; Black’s queen is poorly placed on a8 and the knight on e7 has few immediate prospects. The king on g8 is not in danger (no checks, no back-rank issues with the two rooks still on the 8th), so stepping to g7 does not improve safety, connect pieces, or create threats. It merely spends a tempo while leaving the same structural problems.
Typical ideas for Black are more useful: ...Nf5 (hitting d4 and g3), challenging the center with ...e5 or ...d5, or activating the queen (...Qa7/Qb7/Qb8). Kg7 does none of that and can even make later kingside attacking ideas (queen + bishop battery, pawn advances) slightly easier for White.
The FEN as written contains an extra space on the 2nd rank; the intended position is the one with White’s pieces on a2/d2/f2/g2/h2 plus the rest of the given layout. In that position Kg7 remains inferior.