Building the Thousand-li Wall
Bracing for Tang, Goguryeo built a line of fortifications over a thousand li long from Buyeo Fortress in the north to Bisa Fortress in the south, taking sixteen years.

Rincewind42 [2] · CC BY-SA 3.0 · Source
Tang, which succeeded Sui in 618, at first kept peace with Goguryeo. But in 631 a Tang envoy tore down the gyeonggwan — a victory mound of Sui soldiers’ bones Goguryeo had raised after the Sui wars — and King Yeongnyu began building a wall against invasion.
It was finished under King Bojang in 647. Yeon Gaesomun, put in charge of the works in 642, seized power in a coup that same year. It is not the same as the Goryeo wall of the same name built from the Yalu to Doryeonpo in the 11th century.