BEIJING — Driven by fears that an aging population could jeopardize China’s economic ascent, the Communist Party leadership ended its decades-old “one child” policy on Thursday, announcing that all married couples would be allowed to have two children.

The decision was a dramatic step away from a core Communist Party position that Deng Xiaoping, the Chinese leader who imposed the policy in the late 1970s, once said was needed to ensure that “the fruits of economic growth are not devoured by population growth.”

For China’s leaders, the controls were a triumphant demonstration of the party’s capacity to reshape even the most intimate dimensions of citizens’ lives. But they bred intense resentment over the brutal intrusions involved, including forced abortions and crippling fines, especially in the countryside.