Federal employees and military personnel would have a wider range of options in withdrawing money from their Thrift Savings Plan accounts under a bill that has cleared Congress.

The Senate on Monday joined the House in passing a bill largely aimed at encouraging investors to keep their money in the 401(k)-style program after leaving federal or military service rather than transferring it into an IRA or other retirement savings program.

The bill, which now goes to President Trump, represents one of the most significant changes to the TSP since it became available in the late 1980s for federal employees (military personnel became eligible later). There are more than 5 million account holders with total account balances above $500 billion.

After leaving federal or military service for retirement or other reasons, investors may convert their money into an annuity, withdraw it as a lump sum or draw it out as a series of roughly equal payments monthly. Under the latter two options, they may transfer all or part of the account into an IRA or other retirement savings plan. They also may leave their accounts in place, subject to certain minimum withdrawals required by the tax code.

By moving their money out, TSP officials argue, investors lose the advantage of the TSP’s low administrative costs, as well as the option to invest in a government securities fund that yields higher interest than similar investments elsewhere. However, IRAs offer far more tailoring of withdrawals.

The National Active and Retired Federal Employees Association praised the Senate vote Tuesday as clearing the way for investors to have “greater control over their own retirement savings and the ability to plan responsibly for their future. The changes, common in the private sector, are much needed and long overdue.”

The bill would not change the basic withdrawal options but would add flexibility. Currently, except for financial hardship situations, investors may take only one withdrawal while still employed or on active duty, after age 59½ when there is no longer a tax penalty for such withdrawals. Also, they may take only one partial withdrawal after leaving — and even that is not allowed for those who took one while in service — and must designate a second choice for the remaining account balance.

The measure would allow multiple partial withdrawals, both after reaching the age threshold before separation and after separation. It also would create new options for taking regular payouts: Investors could choose quarterly or annual payments in addition to monthly payments, change the amounts at any time rather than just once a year, and, if they begin but stop such payments, could choose an annuity in addition to a lump sum with their remaining balance.

The need to issue rules to carry out the changes, assuming that the bill is signed into law, likely would push off the effective date until sometime next year.

The TSP started seeking the changes in 2015 after a study of investor behavior found that four-tenths of investors close their accounts within the first year after leaving government, with lack of withdrawal choices being a main reason. A survey released last month similarly showed that three-tenths of participants within 10 years of retirement said they intend to transfer their money out of the TSP on retirement, with the limited range of withdrawal options one of the top reasons cited.

The bill does not address another point of dissatisfaction with the TSP cited in those surveys: the limited investment options. The TSP offers just five core funds, all passive and index-based, and five “life-cycle” funds that mix investments in the core funds, varying by projected withdrawal date.

The TSP has had authority for years to create a “window” through which participants could designate some of their money to be invested in mutual funds available in the open market. The program’s governing board committed in 2015 to using that authority, but it remains in the planning stages.