HANOI, Vietnam — The Communist Party of Vietnam has chosen the incumbent general secretary as the country’s top leader for a second five-year term, the official Vietnam News Agency reported Wednesday.

The reappointment of Nguyen Phu Trong, 71, could slow the pace of Vietnam’s shift to a more open, market-oriented economy, but it is unlikely to alter its strategic balance in relations with China and the United States, analysts said.

Mr. Trong is a leader of the party’s old guard, which was trained in Soviet-style economics and has long seen neighboring China, Vietnam’s top trading partner, as a critical strategic and ideological ally. Notably, Mr. Trong appeared reluctant to criticize China when it deployed an oil rig in disputed waters in 2014.

But his visit to the White House last July underlined a growing view among party elites that developing better relations with the United States is in Vietnam’s national interest, and an essential counterweight to China’s influence in the region. Mr. Trong steered Vietnam into the Trans-Pacific Partnership, an American-led trade agreement among a dozen Pacific Rim nations that excludes China.