Legislation that could affect how millions of Americans save for retirement and how they cash out those nest eggs in their golden years has attracted interest in both the House and the Senate.

The proposed legislation, known as the Retirement Enhancement and Savings Act, could add millions of people to the rolls of tax-deferred retirement accounts by juicing incentives for employers and workers to participate.

“With thousands of people retiring every day, there is a need for increasing retirement savings and putting less pressure on government programs,” said Jeanne de Cervens, vice president and director of federal government affairs at Transamerica.

The incentives would make it easier for small companies to pool together to reduce the costs of maintaining retirement plans. They would also extend the age at which people can contribute to Individual Retirement Accounts beyond 70½ . And they would allow the purchase of annuities, which are attractive because of their lifetime income streams.

The bipartisan Senate bill is sponsored by the heads of the Finance Committee, Sens. Orrin G. Hatch (R-Utah) and Ron Wyden (D-Ore.). That version includes a tax credit to incentivize automatic enrollment and provisions aimed at establishing more flexible multi-employer plans.

In the House, Ways and Means Chairman Kevin Brady (R-Tex) has indicated he intends to include retirement account provisions in a “Tax Reform 2.0” package expected to reach the floor this fall.

It’s not yet clear what will be included in Brady’s package, and the fate of the legislative efforts is uncertain in an election year.

“This bill has a good chance of passing because it has strong, bipartisan support,” said Michael Kreps, a principal at Groom Law Group in Washington who specializes in retirement law.

Kreps said key elements in the RESA legislation that could change 401(k) plans significantly, including a provision that would allow them to more easily offer a guaranteed retirement income.

Under current law, employees with 401(k) plans are left to sort it out. “It’s hard to convert your retirement savings into income,” Kreps said.

The legislation would allow employees in private companies to buy an annuity. “It’s called longevity risk,” Kreps said. “An annuity would go a long way toward eliminating the fear of that people would outlive their savings.”

Many employers are reluctant to offer annuity options because of concerns about lawsuits from 401(k) plan participants in the event that the annuity provider does not — or cannot — make good on the payments.

The legislation offers employers a “fiduciary safe harbor” from liability in the event that the insurance company stops making payments.

Another solution to longevity risk is to allow employees to take a portion of their 401(k) balance, such as 10 percent, and buy an annuity that would kick in later in life, such as at age 85.

“It gets at one of those behavioral impediments,” Kreps said. “There’s something psychologically difficult for people when asked to hand over their life savings to an insurer. But if you give an insurer 10 percent and you still control 90 percent, then you have a backstop if you live too long.”

A major component among the legislation’s 26 elements is a provision that would allow small companies to join to create pools of 401(k) plans, known as multiple-employer plans (MEPs). Cost and complexity are two of the major impediments for small employers to offer a 401(k) plan. Pooled 401(k) plans might remedy that.

About 66 percent of private-sector workers are offered employer-sponsored retirement coverage, according to 2016 data in a U.S. General Accountability Office report.

When it comes to businesses with fewer than 50 employees, the number of uncovered workers is nine times that of uncovered employees at large companies.

“The reason this is important is small employers are less likely to have 401(k) plans or a similar retirement plan for workers than are large companies,” de Cervens said.

The bill is aimed at spreading the costs of operating the plans across a broader base. It would also eliminate rules that restrict the MEPs to member companies in the same industry or sector. The hope is to increase incentives for small businesses to create tax-deferred savings plans.

“As the number of small businesses continues to grow and become a large source of new jobs, expanding retirement plan coverage among small businesses is critical,” de Cervens said.

According to the nonprofit Transamerica Center for Retirement Studies, 89 percent of workers who are offered a 401(k) or similar plan save for retirement, compared with 49 percent of workers at companies offering no plan.

Other proposals in the bill would eliminate the 10 percent cap on automatic employee tax-deferred savings escalation. Under current law, employers can automatically escalate the amount an employee saves, up to 10 percent of salary. If an employee is enrolled in a 401(k) plan that saves 3 percent of the employee’s income, the automatic escalator may increase that to 4 percent the next year, then to 5, 6 or 7 percent until it reaches 10 percent.

The provision would remove the 10 percent cap. An employee under the age of 50 can save up to $18,500 from their annual salary in tax-deferred money in a 401(k) plan. Employees older than 50 can add up to $6,000 in annual tax-deferred savings to the $18,500 limit.

Erica Werner contributed to this report.