The Battle of Qianshuiyuan (Chinese: 淺水原之戰), northwest of present-day Changwu, Shaanxi, was fought in 618 between the Tang dynasty and the state of Qin.
The battle ended in victory for the Tang, whose armed forces were led by the future emperor Li Shimin.
In 618 AD, Xue Ju, who occupied Longxi and made Tianshui his capital, styled himself as the Qin emperor (秦帝).
In 618 AD, Emperor Gaozu of Tang appointed Li Shimin as the marshal to meet the Qin forces head-on.
When the Xue army were short of provisions, Li Shimin took great advantage of physical features of Qianshuiyuan and started attacking.