Back-rank checkmate

In chess, a back-rank checkmate (also known as a corridor mate) is a checkmate delivered by a rook or queen along the opponent's back (that is, the row closest to them) in which the mated king is unable to move up the board because the king is blocked by friendly pieces (usually pawns) on the second rank.

Introduction
Back-rank mates occur quite often in games at fairly low levels. This is because beginners typically fail to anticipate an impending mate on the back rank. At higher levels of play, though the mate itself does not occur very often, play is often affected by the possibility of it—the fact that a player has to spend time guarding against the mate may leave them vulnerable to other threats and tactical ideas.

Back-rank mates are often guarded against by a friendly rook or queen protecting the back rank. However, it may be possible for the attacking side to deflect one of these pieces away from defensive duties, sacrifice a queen for one of them, or exchange one of them, or the pieces may simply be overworked. In the example shown to the left, White can play 1.Qxc6 and black cannot reply 1...Rxc6 because of 2.Rd8+ Rxd8 3.Rxd8# with a back-rank mate. Black therefore loses his bishop for no compensation—and Black has no good continuation because of the threat of Qxa8 or Qxc8, for example, 1...Qa6 2.Qxa8! Rxa8 3.Rd8+ Rxd8 4.Rxd8#. If Black tries to defend the back rank so that White's queen and bishop are skewered, White can keep an extra piece, for example 1...b5 (defending d8 with the queen) 2.Qf3! keeping the rook on c8 stuck to the defense of the rook on a8, or 1...g6 (creating luft) 2.Qf6! and Black still cannot take due to the back-rank mate.

Back-rank threats can be guarded against more permanently by moving one of the pawns in front of the king to give the king a flight square (or luft). If it were Black to play in the example to the left, he could counter White's threat with, for example, 1...g6, giving the king a square on g7 to which it can safely move. Note, however, that 1...h6 in this example would not do the job, as after the d3-rook moves, the h7-square is covered by the white bishop. Black cannot move the bishop to safety first either, due to a situational pin, e.g. 1...Bb7? 2.Qxc8+! Rxc8 3.Rd8+ Rxd8 4.Rxd8#, or 1...Bd7 2.Rxd7 when the queen once again cannot be taken due to the back rank threat.

It is often not a good idea to play such pawn moves unless there is a pressing need to do so, as they can not only represent a loss of time, but may also allow enemy penetration around the squares weakened by the pawn advance. In many chess openings, however, they are often played for some other purpose, before any back-rank threat has emerged (...h6 is often played to "put the question" to a white bishop on g5, for example; see also Fianchetto).

Examples
In high-level games, a deflection is often necessary to force a back rank mate. Below are two famous examples.

Bernstein vs. Capablanca
One of José Raúl Capablanca's most famous games featured a variety of back-rank threats at the end. It was an exhibition game played in Moscow in 1914 against Ossip Bernstein (Capablanca had the black pieces). The position shown to the right was reached after White's 29th move. Capablanca now played 29...Qb2! The simplest point is that 30.Qxb2 is not possible because of the back-rank mate 30...Rd1#, but there are several related ideas: for example, 30.Qe1, apparently defending the threatened rook, loses to 30...Qxc3 (if 31.Qxc3 then 31...Rd1+ 32.Qe1 Rxe1#); 30.Rc2 fails to 30...Qb1+ 31.Qf1 Qxc2; and 30.Qc2 loses to 30...Qa1+ 31.Qc1 Rd1+ 32.Qxd1 Qxd1#, or 30...Qxc2 31.Rxc2 Rd1#. After 30.Rc8 it looks like white may turn the tables as 30...Rxc8? allows 31.Qxb2 to win a queen for a rook, however Capablanca has 30...Qa1+ (or Qb1+) when instead White loses a rook after 31.Qf1 Qxf1+ 32.Kxf1 Rxc8. Similarly, 30.Qd3 loses to 30...Qa1+ (not 30...Rxd3?? 31.Rc8+) 31.Qf1 Qxc3. So Bernstein had to resign.

Note that had Capablanca played for the back-rank mate more directly with 29...Qb1+ 30.Qf1 Rd1?? (30...Qxa2 would be sensible), he would himself have lost to the back-rank mate 31.Rc8+ Rd8 32.Rxd8#.

Adams vs. Torre Repetto
This game was most likely never played, instead being composed by Carlos Torre Repetto as a tribute to his instructor Edwin Ziegler Adams. In this position, Black's rook on c8 and queen on d7 are all what prevent White from mating with Rxe8+, so White begins deflecting the black queen or rook by force:
 * 18.Qg4! Qb5

If 18... Qd8, then 19.Qxc8! wins a rook, since the rook on e8 now cannot move off e8 to recapture and thus cannot add to the defense of e8. Black cannot play 18...Rxe2 because 19.Qxd7 wins the queen for a rook, as the white knight guards the other rook on e1. Neither rook can move to defend the queen, as after 18...R(either)d8, the rook is overloaded and 19.Qxd7 simply wins a queen.
 * 19.Qc4!!

As with the previous example, the perpetrator of the back rank mate must be careful to not themselves fall for one: 19.a4?? allows 19...Qxe2! when 20.Rxe2 allows 20...Re1+ 21.Ne1 Rxe1+ 22.Rxe1 Rxe1#. With this and the following move, White obstructs the c-file with tempo.
 * 19... Qd7 20.Qc7!! Qb5

At no point can Black take the queen with either rook or queen, because of Rxe8+.
 * 21.a4!

White must once again be careful with their own back rank: the immediate 21.Qxb7?? loses to 21...Qxe2! since 22.Rxe2 allows 22...Rc1+ 23.Re1 R(either)xe1+ 24.Nxe1 Rxe1#. With this move, White prepares the following move, removing their rook from e2 with tempo.
 * 21... Qxa4 22.Re4!

Black's queen has only one remaining safe square to defend e8 from.
 * 22... Qb5

If 22...Qxe4, then 23.Rxe4 and neither black rook can take either white major piece, as the other black rook then falls with check and subsequently back rank mate.
 * 23.Qxb7! 1–0

Black's queen has no remaining safe squares from which to defend e8 and is hanging, so Black must either lose at least a queen for a rook or be checkmated on the back rank.