The king is a piece in the game of chess. The king represents the prize the opposition seeks to win. If the king is threatened and cannot escape capture, the king is said to be in checkmate and the game is lost. Each player starts with his king in the middle of his first rank, between the queen and the king's bishop. In algebraic notation, the white king starts on e1 and the black king on e8.
A king can move one square in any direction (horizontally, vertically, and diagonally as shown at left), except that it may not move onto a square that is under attack by an enemy piece. As with most pieces, it captures by moving onto a square occupied by an enemy piece. Also, in conjunction with a rook, the king may make a special move called castling.
If an opponent's move places the king under attack, it is said to be in check, and the player in check is required to immediately remedy this situation by moving the king, capturing the attacking piece, or interposing a piece between the king and the attacking piece. If none of these three options are possible, the player has been checkmated and loses the game.
A player may not make any move that leaves his king exposed to attack. If the king is not under attack, and all available moves for that player would place the king under attack, then that player has been stalemated and the game is drawn.
In the opening and middlegame, the king rarely plays an active role, instead seeking safety on the edge of the board behind friendly pawns. In the endgame, however, the danger of checkmate is minimal, and the king emerges to play an active role in assisting the promotion of friendly pawns.
It is impossible to assign a value to the king relative to the other chess pieces, because the king can't be exchanged. Its value in that sense is infinite. However, in the endgame the king has a power of attack and defense somewhat greater than a bishop or a knight.