Defensive technique in chess
In chess, a fortress is an endgame drawing technique in which the side behind in ;dfn id="" ;material ;/dfn ; sets up a zone of protection that the opponent cannot penetrate. This might involve keeping the enemy king out of one's position, or a safe zone the enemy cannot force one out of (e.g. see the opposite-colored bishops example). An elementary fortress is a theoretically drawn (i.e. a ;dfn id="" ;book draw ;/dfn ;) position with reduced material in which a passive defense will maintain the draw.
Fortresses commonly have the following characteristics:
Fortresses pose a problem for computer chess: computers fail to recognize fortress-type positions (unless using a suitable endgame tablebase) and incorrectly claim a winning advantage in them.
 ;templatestyles src="Template:TOC_left/styles.css" / ;
Fortress in a corner.
Perhaps the most common type of fortress, often seen in endgames with only a few pieces on the board, is where the defending king is able to take refuge in a corner of the board and cannot be forced away or checkmated by the superior side. These two diagrams furnish two classic examples. In both cases, Black simply shuffles their king between a8 and the available square adjacent to a8 (a7, b7, or b8, depending on the position of the white king and pawn). White has no way to dislodge Black's king, and can do no better than a draw by stalemate or some other means.
Note that the bishop and wrong rook pawn ending (i.e. where the pawn is a rook pawn whose promotion square is the color opposite to that of the bishop) in the diagram is a draw even if the pawn is on the seventh rank or further back on the a- ;dfn id="" ;file ;/dfn ;. Heading for a bishop and wrong rook pawn ending is a fairly common drawing resource available to the inferior side.
The knight and rook pawn position in the diagram, however, is a draw only if White's pawn is already on the seventh rank, making this drawing resource available to the defender much less frequently. White wins if the pawn is not yet on the seventh rank and is protected by the knight from behind. With the pawn on the seventh rank, Black has a stalemate defense with their king in the corner.
Example game: Serper vs. Nakamura, 2004.
A fortress is often achieved by a sacrifice, such as of a piece for a pawn. In the game between Gregory Serper and Hikaru Nakamura, in the 2004 U.S. Chess Championship, White would lose after 1.Nd1 Kc4 or 1.Nh1 Be5 or 1.Ng4 Bg7. Instead he played
1. Nxe4! Kxe4
2. Kf1! 
Heading for h1. After another 10 moves the position in the following diagram was reached: 
Black has no way of forcing White's king away from the corner, so he played
12... Kf2 
and after 13.h4 gxh4 the game was drawn by stalemate.
Back-rank defense.
The back-rank defense in some rook and pawn versus rook endgames is another type of fortress in a corner (see diagram). The defender perches their king on the pawn's queening square, and keeps their rook on the back rank (on the "long side" of the king, not, e.g., on h8 in the diagram position) to guard against horizontal checks. If 1.Rg7+ in the diagram position, Black heads into the corner with 1...Kh8! Note that this defense works "only" against rook pawns and knight pawns.
Rook vs. bishop.
In the ending of a rook versus a bishop, the defender can form a fortress in the "safe" corner—the corner that is not of the color on which the bishop resides (see diagram). White must release the potential stalemate, but they cannot improve their position.
1. Rc3 Ba2
2. Rc2 Bb3
3. Rc7 Bg8
Pawn and bishop.
In this position from de la Villa, White draws if their king does not leave the corner. It is also a draw if the bishop is on the other color, so it is not a case of the wrong bishop.
Rook and pawn versus queen.
In the diagram, Black draws by moving his rook back and forth between the d6- and f6-squares, or moves his king when checked, staying behind the rook and next to the pawn. This fortress works when all of these conditions are met:
The white king is not able to cross the rank of the black rook, and the white queen is unable to do anything useful.
 1. Qd5+ Rd6
 2. Qb5+ Kd8
 3. Qb8+ Kd7
 4. Qb5+ ½-½
Positions such as these (when the defending rook and king are near the pawn and the opposing king cannot attack from behind) are drawn when (see diagram):
Otherwise, the queen wins.
Example from game.
In this position, with Black to move, Black can reach a drawing fortress. 
 1...b4
 2. Kd6 Rc3
 3. Kd7
and now 3...Ka3 and several other moves reach the fortress. In the actual game, Black made the weak move 3...Rd3+? and lost.
Similar example.
In this 1959 game between Whitaker and Ferriz, White sacrificed a rook for a knight in order to exchange a pair of pawns and reach this position, and announced that it was a draw because (1) the queen cannot mate alone, and (2) the black king and pawn cannot approach to help. However, endgame tablebase analysis shows Black to have a forced win in 19 moves starting with 50... Qc7+ (the only winning move), taking advantage of the fact that the rook is currently unprotected – again illustrating how tablebases are refining traditional endgame theory.
Example with more pawns.
From the diagram, in Salov vs. Korchnoi, Wijk aan Zee 1997, White was able to hold a draw with a rook versus a queen, even with the sides having an equal number of pawns. He kept his rook on the fifth rank blocking in Black's king, and was careful not to lose his rook to a fork or allow a queen sacrifice for the rook in circumstances where that would win for Black. The players agreed to a draw after:
48. Kg2 Kg6 49. Rh5 Qe2+ 50. Kg3 Qf1 51. Kf4 Qe1 52. Rd5 Qc1+ 53. Kg3 Qc7+ 54. Kg2 Qf4 55. Rh5 Kf6 56. Rd5 Ke6 57. Rh5 Qd2+ 58. Kg3 f6 59. Rf5 Qc1 60. Rh5 Qg1+ 61. Kf4 Qe1 62. Rb5 Qc1+ 63. Kg3 Qg1+ 64. Kf4 Qh2+ 65. Ke3 Kf7 66. Rh5 Qg1+ 67. Kf4 Kg6 68. Rd5 Qh2+ 69. Ke3 Kf7 70. Rh5 Qg1+ 71. Kf4 Ke6 72. Rb5 Qh2+ 73. Ke3 Kd6 74. Rf5 Qb2 75. Rh5 Ke6 76. Kf4 Qc3 77. Kg3 Qc7+ 78. Kg2 Qf7 79. Rb5 Qe8 80. Rf5 Qg6 81. Rb5 ½–½
Opposite-colored bishops.
In endings with bishops of opposite colors (i.e. where one player has a bishop that moves on light squares, while the other player's bishop moves on dark squares), it is often possible to establish a fortress, and thus hold a draw, when one player is one, two, or occasionally even three pawns behind. A typical example is seen in the diagram. White, although three pawns behind, has established a drawing fortress, since Black has no way to contest White's stranglehold over the light squares. White simply keeps his bishop on the h3–c8 diagonal.
Example from game.
In an endgame with opposite-colored bishops, positional factors may be more important than material. In this position, Black sacrifices a pawn (leaving him three pawns down) to reach a fortress.
 1... Kf5!
 2. Kxf7 Bh5+
 3. Kg7 Bd1
 4. Be7 ½-½
After 4...Be2 5.Kh6 Bd1 6.h5 Black just waits by playing 6...Be2.
Queen versus two minor pieces.
Here are drawing fortresses with two ;dfn id="" ;minor pieces ;/dfn ; versus a queen. Usually the defending side will not be able to get to one of these positions.
Bishop and knight.
The bishop and knight fortress is another type of fortress in a corner. If necessary, the king can move to one of the squares adjacent to the corner, and the bishop can retreat to the corner. This gives the inferior side enough tempo moves to avoid zugzwang. For example:
1. Kb5 Ka7
2. Qd8 Ba8
3. Ka5 Bb7.
Two bishops.
In the two bishop versus queen ending, the queen wins if the Lolli position is not reached, but some of them take up to seventy-one moves to either checkmate or win a bishop, so the fifty-move rule comes into play. From the diagram:
1. Qe7+ Kc8
2. Qe6+ Kb7
3. Qd6 Ba7
4. Qe7+ Kb6!
5. Qd8+ Kb7!
6. Ka5 Bc5!
and White cannot prevent ... Bb6, which gets back to the Lolli position. 
Two knights.
In the two knights fortress, the knights are next to each other and their king should be between them and the attacking king. The defender must play accurately, though.
There are several drawing positions with two knights against a queen. The best way is to have the knights adjacent to each other on a file or rank, with their king between them and the enemy king. This is not a true fortress since it is not static. The position of the knights may have to change depending on the opponent's moves. In this position (Lolli, 1763),
 1. Qd1 Nd2+
 2. Ke2 Nb3
and Black has an ideal defensive position.
 ;templatestyles src="Col-begin/styles.css"/ ;
If the knights cannot be adjacent to each other on a file or rank, the second best position is if they are next to each other diagonally (see diagram).
The third type of defensive formation is with the knights protecting each other, but this method is more risky.
With pawns.
Sometimes the two minor pieces can achieve a fortress against a queen even where there are pawns on the board. In
Ree-Hort, Wijk aan Zee 1986 (first diagram), Black had the material disadvantage of rook and bishop against a queen. Dvoretsky writes that Black would probably lose after the natural 1...Bf2+? 2.Kxf2 Rxh4 because of 3.Kg3 Rh7 4.Kf3, followed by a king march to c6, or 3.Qg7!? Rxf4+ 4.Kg3 Rg4+ 5.Kf3, threatening 6.Qf6 or 6.Qc7. Instead, Hort forced a draw with 1... Rxh4!! 2. Kxh4 Bd4! (imprisoning White's queen) 3. Kg3 Ke7 4.Kf3 Ba1 (second diagram), and the players agreed to a draw. White's queen has no moves, all of Black's pawns are protected, and his bishop will shuttle back and forth on the squares a1, b2, c3, and d4.
Knight versus a rook and pawn.
At the great New York City 1924 tournament, former world champion Emanuel Lasker was in trouble against his namesake Edward Lasker, but surprised everyone by discovering a new endgame fortress. Despite having only a knight for a rook and pawn, White draws by moving his knight back and forth between b2 and a4. Black's only real winning try is to get his king to c2. However, to do so Black has to move his king so far from the pawn that White can play Ka3–b2 and Nc5xb3, when the rook versus knight ending is an easy draw. The game concluded:
93. Nb2 Ke4 94. Na4 Kd4 95. Nb2 Rf3 96. Na4 Re3 97. Nb2 Ke4 98. Na4 Kf3 99. Ka3! Ke4 
If 99...Ke2, 100.Nc5 Kd2 101.Kb2! (101.Nxb3+?? Kc2 and Black wins) and 102.Nxb3 draws. 
100. Kb4 Kd4 101. Nb2 Rh3 102. Na4 Kd3 103. Kxb3 Kd4+ ½–½
Bishop versus rook and bishop pawn on the sixth rank.
A bishop can make a fortress versus a rook and a bishop pawn on the sixth rank, if the bishop is on the color of the pawn's seventh rank square and the defending king is in front of the pawn. In this position, White would win if he had gotten the king to the sixth rank ahead of the pawn. Black draws by keeping the bishop on the diagonal from "a2" to "e6", except when giving check. The bishop keeps the white king off "e6" and checks him if he goes to "g6", to drive him away. A possible continuation:
1... Ba2 2. Kf4 
2.f7 is an interesting attempt, but then Black plays 2...Kg7! (not 2...Bxf7?? when White wins by playing 3.Kf6) and then 3...Bxf7, with a draw. 2...Kg7 prevents 3.Kf6, which would win.
2... Bc4 3. Kg5 Bd5! 
The only move to draw, since the bishop must be able to check the king if it goes to g6.
4. Rc7 Ba2! 5. Kg6 Bb1+! 6. Kh6 Ba2! 7. Ra7
If 7.f7 Bxf7!: the pawn can be safely ;dfn id="" ;captured ;/dfn ; when the white king is on h6.
7... Bc4
Draw, because White cannot make progress.
Defense perimeter (pawn fortress).
A "defense perimeter" is a drawing technique in which the side behind in ;dfn id="" ;material ;/dfn ; or otherwise at a disadvantage sets up a