The retirement savings program for federal and military personnel is preparing to more than double the number of countries represented in its investment fund that tracks international stock markets.

One of the countries to be added is China — and that’s a problem for some people.

Eight former senior military leaders have issued an open letter seeking to prevent the change, which is set to take effect in the second half of this year. The letter has rekindled a controversy that has flared several times since the Thrift Savings Plan first committed to broadening its international stock fund, called the I Fund.

The result, the letter said, will be that a portion of money in the fund will be invested in Chinese companies including “weapons manufacturers, U.S.-sanctioned entities and other malevolent enterprises of the Chinese Communist Party.”

“It is especially intolerable to those of us who have proudly served the Nation in uniform that our retirement investments will help its enemies threaten our comrades-in-arms and the country we love,” said the letter, whose signers include two former White House national security advisers, retired Commandant of the Marine Corps Gen. James L. Jones and retired Navy Vice Adm. John M. Poindexter.

The letter was released in coordination with the Committee on the Present Danger: China, which defines its mission as “to educate and inform American citizens and policymakers about the existential threats presented from the Peoples Republic of China under the misrule of the Chinese Communist Party.” The group, a successor to similarly named Cold War-era organizations, was reconstituted last year by Stephen K. Bannon, former chief strategist to President Trump, and others who hold hawkish views on China.

The letter was meant to draw the attention of current military leaders, Trump, Congress and TSP investors, said Frank Gaffney Jr., vice chairman of the group, in a phone interview.

Gaffney, a Pentagon official in the Reagan administration, is a political commentator and the executive chairman of the Center for Security Policy, a conservative advocacy group. He is a polarizing figure who has been accused of advancing conspiracy theories about Muslims.

“This is in microcosm an example of a problem that we’ve been raising the alarm about, that we are underwriting the threat we are now facing from China,” Gaffney said. “It just happens that this can be understood as a particular outrage because what it involves is compelling military personnel among others to invest in really dangerous companies in China.”

Such controversies stretch back more than three years to when the Thrift Savings Plan first decided to broaden the I Fund to reflect the markets of more countries. The TSP reconsidered and reaffirmed the decision just months ago after some in Congress raised similar concerns.

“This is not about China, from our perspective,” TSP spokeswoman Kim Weaver said. “This is about offering to TSP participants the same investment options that are available to other Americans.”

All TSP investment funds are index-based, tracking overall markets. Four others track indexes of large- and small-company U.S. stocks, bonds and government securities, and there are target-date funds with differing mixes of the basic five.

Of the $565 billion that the nearly 6 million account holders had invested in the TSP as of the end of March, the I Fund held about $41 billion, about 7 percent, including its portion of the target-date funds.

The TSP is a self-funding independent agency that operates like a corporation in some ways, including being directed by a governing board of private-sector financial experts. However, its basic policies are set by laws, including one requiring it to offer a fund that reflects “a reasonably complete representation of the international equity markets excluding the United States equity markets.”

Since the I Fund’s inception in 2001, the TSP has based it on an index that tracks stock markets of 21 countries, mostly in Europe and not including Canada or any “emerging-market” countries.

The TSP board decided in late 2017 to change the underlying index to one also including 26 emerging-market countries plus Canada, based on a report it commissioned from the Aon consulting firm. It found the TSP is an outlier among similar programs in not offering investments in emerging markets.

Chinese stocks accounted for about 11 percent of that index as of the end of March, compared with about 17 percent for Japan, 10 percent for the United Kingdom, and 7 percent each for France, Switzerland and Canada.

Making the change has proved to be a multiyear project, and the inclusion of China has remained an issue. Bills to prevent TSP money from being invested in China were introduced in the 2017-18 Congress and again in the present Congress, although they have not advanced. Meanwhile, some members of Congress urged the TSP to reverse course on its own.

In response, the TSP had Aon perform a follow-up study last year, which again endorsed using the broader index. In November, the TSP board recommitted to it — although one member preferred a delay until a planned widening of TSP fund offerings, set for 2022, that will allow participants to invest in more targeted funds offered by mutual fund companies.

In a letter to several senators who had challenged the change, the board said, “Investing in emerging markets is not only legal but is the overwhelming choice of fiduciaries across industries and the choice of individual Americans.”

The second report found that all 10 of the largest publicly traded U.S. companies, all 10 of the top federal contractors, all 20 of the largest state pension plans and all six of the largest target-date mutual fund providers invest in emerging markets including China, the letter said.

It added that the Treasury Department’s Office of Foreign Assets Control has the authority to ban investments in companies or entire countries based on threats to U.S. national security, foreign policy or economy. If that office issues such a ban, “that country or company would be dropped from the index and, thereby, eliminated from the TSP line-up, and no U.S. investor would invest in those countries or companies,” it said.

In addition, Weaver of the TSP said in a phone interview, “If someone doesn’t want to invest in the I Fund, they don’t have to invest in the I Fund.”

But Gaffney said that if investors want to have a diversified portfolio including international stocks in their TSP accounts, they won’t have a choice but to have some of their money invested in Chinese companies.

“That’s not a choice that people should have to make, if they want to be in the I Fund,” he said.