In the early Eastern Han Dynasty, Emperor Guangwu Liu Xiu had established his court in Luoyang, but the border regions were not yet fully unified.
At the time, the border region was dominated by two major warlords. One was Gongsun Shu, who had served as the governor of Shu Commandery under Wang Mang's Xin Dynasty and later declared himself emperor in Chengdu, relying on the natural defenses of Shu. The other was Wei Xiao, who controlled the areas of Wudu, Jincheng, and Tianshui, styling himself the Supreme General of Xizhou. The two were at odds, frequently clashing in battle.
To isolate Gongsun Shu, Emperor Guangwu of Han, Liu Xiu, decided to win over the warlord Wei Xiao. Seeking a political path forward, Wei Xiao sent a letter to Liu Xiu pledging allegiance. In response, Liu Xiu appointed Wei Xiao as General of the Western River.
Soon, Gongsun Shu launched an invasion into central Shaanxi, threatening Chang'an. Wei Xiao led his troops in coordination with Liu Xiu's forces, defeating Gongsun Shu's attack. For this, Wei Xiao earned Liu Xiu's trust.
To prevent Gongsun Shu's influence from spreading outward, Liu Xiu deployed some troops in the west and wrote a tactfully worded letter to Wei Xiao:
"I am currently busy fighting in the east, with most of my forces concentrated there. The western front is weak—if Gongsun Shu attacks, it could even endanger you. I hope to ally with you against him, so that our combined strength will be evenly matched!"
When Kui Ao received Liu Xiu's letter, he accepted his advice. Later, Kui Ao and Liu Xiu joined forces, launching a campaign that decisively defeated Gongsun Shu.
Later, the idiom "matched banners and drums" came to describe two opposing sides being evenly matched.
Source: *Book of the Later Han*, "Biography of Wei Xiao"
Meaning of the Idiom: Later, the Chinese idiom "旗鼓相当" came to describe how two opposing sides being evenly matched.