---
title: "How to Defend Your Palace in Xiangqi · Xiangqi Master"
description: "Trade an attacker, keep both advisors, give the general a spare point, and count the attackers instead of answering threats one at a time."
url: https://xiangqimaster.com/blog/how-do-i-defend-against-an-attack-on-my-palace
updated: 2026-09-22
source: Xiangqi Master (https://xiangqimaster.com)
license: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
---

# How do you defend an attack on your palace?

These answers restate the rules implemented by our open-source engine, which follows the WXF laws and is regression-tested against the official 110-diagram repetition casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it against the engine before publishing.

> Direct answer
>
> **Trade one of the attacking pieces.** Two attackers become one, and one attacker achieves nothing — this is the most reliable defence in the game and is worth a soldier or more. Alongside that: keep both advisors, leave the general a spare point, and **count attackers** rather than reacting to threats one at a time.

## Counting beats reacting

The classic defensive failure is answering each threat as it appears while the attacker brings a third piece. Instead, count what they can bring to your palace in three moves against what you can bring back. If you are behind on that count, you need to change the position now — usually by trading.

## Check your own pieces are not the problem

In several standard mates the defender's own advisors block the general's escape. Before adding another defender, ask whether one of your pieces is occupying the point your general needs.

## Related questions

Is giving up material to defend correct?

Often. A soldier to trade a chariot is usually a good deal when your palace is under pressure.

Should I bring pieces back to defend?

Only if they arrive in time. A defender that arrives after the mate is worse than useless.

## Related xiangqi resources

Attacking the palace

How xiangqi attacks are built

Advisors and elephants

The defence that decides most endgames

Common mistakes

The errors that decide most club games

## Try it on a real board

Reading an answer is one thing; playing it is another. Free, instant, and nothing to install.
