The siege of Songping or the siege of Hanoi was part of Nanzhao's great offensive in 863. Nanzhao was in alliance with local tribal rebels, against the Tang dynasty who was currently in control of the Red River Delta in modern-day northern Vietnam. The siege took place in Songping (modern-day Hanoi), capital of Tang's frontier Protectorate General to Pacify the South in early 863 during the reign of Emperor Yizong. It was the fourth time since 858 that Songping was attacked by Nanzhao forces