lichess.org
Donate

Why Can't I Take White's Rook Here?

First of all, I don't know for sure how to share images of the board here, but I've shared the PGN info here from the Lichess board analysis. That said, there are only 9 pieces on the board so I can use notation to set the field in text. For White, Kf1, Rd1, Nf2, and a pawn on a3. For Black, Kd2, Rf8, and pawns on g5, d6, and a6. Black in check and to move.

I'm playing Black and White previous move was Rd1+. I thought I could take the Rook with my King because White's Knight is pinned by my Rook on f8. I was playing on the DGT Centaur board and it wouldn't let me make the move. Thinking it was glitched or salty about blundering a Rook, I went here to see what Lichess's analysis tool would say. And it too isn't let me take the Rook. It suggested Kc2.

What fundamental rule of chess am I missing here? To me, White's Knight is pinned by my Rook. I understand that by taking the Rook, my own Rook becomes pinned until my King leaves d1 or White's King leaves f1.

I'm just perplexed that two separate chess engines are saying that I can't take the Rook and I can't understand why. I'm hesitant to post this, because it feels like I'm missing something obvious, but I'm genuinely stumped. Any help explaining would be greatly appreciated.

[Variant "From Position"]
[FEN "5r2/8/p2p4/6p1/8/P7/3k1N2/3R1K2 b - - 0 1"]
@edman87 You can't take the rook with your king, since you would move it into a check by the knight. The knight being pinned does not play a role in such kind of situations.

Or a bit more colorful: Even tho the knight can't jump to d1 because it's pinned, it still can take/throw a dump there.

As a rule: Kings are never allowed to "walk into" checks.

Good luck on your lifelong chess journey!
Thanks, derkleinejo. I knew it was a silly question, but I thought at the time I made a good move by pinning the Knight. But I can now see that it technically takes my King before my Rook can take White's King in response. Therefore, I've already lost. Good luck in your journey as well!
The official rules answer this question as well. See the FIDE Laws of Chess Article 3.9:

The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces,
even if such pieces are constrained from moving to that square because they would then
leave or place their own king in check. No piece can be moved that will either expose the
king of the same colour to check or leave that king in check.

www.fide.com/FIDE/handbook/LawsOfChess.pdf