The Edward Snowden spy affair not only imperils the National Security Agency’s operations, but also threatens Jonathan Nelson’s Providence Equity Partners.

One of Nelson’s largest investments — $782 million in equity — is in Altegrity, the parent company of USIS, which allegedly failed to do a proper background check on Snowden.

That 2007 leveraged buyout is now in jeopardy.

The Department of Justice on Wednesday is expected to file civil charges against USIS for failing to perform quality control reviews in connection with its background investigations for the US Office of Personnel Management.

At the same time, Altegrity, struggling under a $1.8 billion mountain of debt and a slowing government contract sector, is working with investment bank Evercore Partners to recapitalize its debt.

It has until March 31 to get it down.

If it doesn’t rework its debt by that date, it is likely to fall below a required operating profit-to-debt ratio and find itself in default, two sources close to the situation said.

An Altegrity spokesperson said, “The company believes it has ample liquidity and a number of options to address its upcoming debt maturities.”

While the company may work out its debt issues under the pressure of a looming deadline, moves over the last year by Altegrity to do the same failed.

Roughly a year ago, Altegrity hired an investment bank to sell part of USIS, three sources said.

“They got very close to a deal [with a private equity firm]” just as summer was on the horizon, a source close to the situation said.

Altegrity then tried to sell a smaller second unit, HireRight Inc., a provider of on-demand employment background and drug screening solutions, but an auction failed to attract suitors willing to pay a high-enough price.

The third Altegrity unit, Kroll Advisory Solutions, is profitable and not for sale.

Meanwhile, billionaire Nelson — who likes to be seen as one of the most astute buyers of media and telecom companies, including the YES network — is at risk of losing his once-sterling reputation

The mild-mannered Nelson, 57, who goes helicopter skiing in Greenland, has generated a well-below-average 3.3 percent annual return from his $12 billion 2007 buyout fund, as of June 30. The firm, with this record, only raised $5 billion for its new fund, well under its $8 billion target.

Weighing on the minds of debt holders being asked to recapitalize is that weeks after the March 31 deadline, Washington will decide if it is willing to award USIS a pending contract it has bid on.

The $400 million Department of Homeland Security contract, to be awarded in June, is the first significant contract renewal since the Snowden affair surfaced.

With Wednesday’s expected Justice civil suit likely to be bouncing around the court, all eyes will be on DHS to see if it awards the deal to USIS.

The Justice Department is expected to charge USIS with cutting corners and failing to undertake stringent background checks — which lead to the Snowden affair.