SEOUL, South Korea — During the Cold War, the one-upmanship between North and South Korea was so intense that it extended to the height of the flagpoles at their border. So when the South hosted the Summer Olympics in 1988, it was no surprise that the North tried to do it one better in 1989.

What followed was one of the biggest boondoggles in North Korean history, one that played a part in the economic catastrophe that soon engulfed the country, according to analysts and North Korean defectors.

By some estimates, the North spent $4 billion on the World Festival of Youth and Students, a kind of socialist quasi-Olympics and cultural extravaganza. It expanded its airport in Pyongyang, the capital. It laid new streets, built one of the biggest stadiums on Earth and started work on a hotel meant to reach more than 1,000 feet into the sky.

All of this was done at a time when the North’s centrally planned economy was already shrinking. The spending — directed by Kim Jong-il, then the country’s leader in waiting — would leave North Korea even more dismally prepared for the coming collapse of Soviet Communism, which deprived it of economic aid and trading partners, and for a string of droughts and floods that wiped out its agriculture. The famine that followed in the 1990s killed as many as two million people.