COLUMBIA, S.C. — Four years after South Carolina lawmakers passed a law they hailed as keeping the state’s public pension system solvent for generations, they are scrambling to fill a deepening deficit that could affect every taxpayer in the state.

While public pensions nationwide are struggling with growing debt, South Carolina’s situation has been worsened by investment underperformance. The state’s $28 billion pension portfolio — which 1 in 10 South Carolinians are counting on for their retirement — would be worth about $4 billion more if returns over the last decade had been on par with other large public pensions, according to an analysis by the state’s public benefits agency.

Keeping the debt in check will likely require workers in the system and taxpayers overall to pay hundreds of millions more in the upcoming years, unless investments pick up substantially. And even the state’s investors don’t expect that to happen anytime soon.

“We’re trying to be very upfront. We recognize our contribution” to the problem, said Michael Hitchcock, director of the Retirement System Investment Commission, which manage the state’s portfolio. “We’re trying to correct that. But even if we were the number one pension fund in the country, it’s going to be tough for the next few years.”

Ultimately, any changes are up to the Legislature, which returns in January. A joint House-Senate study committee began meeting earlier this week.

WHO’S IN THE SYSTEM?

The system paid retirees about $3 billion last year in benefits while collecting $2 billion from public employers and their workers. Investment income is supposed to more than fill the gap. When it doesn’t, employers and employees must equally split the cost, as per the 2012 law.

South Carolina’s public workers already pay more for benefits than their counterparts in other states, who contribute less than 6 percent of their salaries on average. On July 1, contributions increased by half a percent, to 8.7 percent for workers in the main plan and to 9.2 percent for officers and firefighters in the smaller, law enforcement plan.

That means an additional $56 million will collectively come out of the paychecks of 223,000 employees in the two plans this fiscal year. The other $56 million will come from the plans’ 850 taxpayer-supported employers including school districts, local governments and even certain hospitals.

With South Carolina’s rates already so high, “I want to ensure our answer to this deficit is not on the backs of our employees,” Rep. Gilda Cobb-Hunter, D-Orangeburg, said at Tuesday’s meeting.

WHAT’S THE PROBLEM?

Lawmakers refer to a debt that’s more than $20 billion and growing. While that figure sounds ominous, it doesn’t mean the system’s collapse is imminent.

“People retiring soon don’t have to worry much about it. It’s the younger people,” said state Comptroller Richard Eckstrom.

The unfunded liability has amassed since 1999 due to investment underperformance, legislative decisions on benefits and fewer workers supporting more retirees. It represents the portfolio’s current worth compared to pension benefits likely owed to all 550,000 people in the system, until they die, factoring in career-long salary expectations for current employees.

The debt is essentially financed over 30 years. The payoff depends on all assumptions — ranging from workforce size to mortality rates — being correct and the portfolio earning a 7.5 percent annual return.

But that’s a benchmark many call unreasonably high for any pension system, especially in today’s investment climate.

The investment commission has surpassed it just five times since its 2005 creation, for a 10-year average of 4.5 percent.

The portfolio actually lost money for the fiscal year that ended June 30. Its negative 0.39 percent return after fees compares to a 0.93 percent average gain among large public pensions nationwide, according to Wilshire Associates.

It marked the portfolio’s first net loss since 2009, when the stock market’s plunge took it down nearly 20 percent.

In reaction to that “punch in the gut,” Hitchcock said, commissioners started investing heavily into alternatives that came with higher fees, thinking they offered protection from another crash, but that left South Carolina unable to capitalize on stock market gains since then.

And the agency was so focused on the details of diversifying, it failed to reevaluate and pivot, he said.

Earlier this year, the commission adopted a new asset allocation, but it will take three years to fully implement, he said.

“The mistake we made coming out of the financial crisis was diversifying away from what just hurt us. The other classic mistake you can make is running to what just worked. We’re trying to avoid” that, said Hitchcock, who took the agency’s helm two years ago.