Creditors are nearing an agreement to seize control of the embattled security company that vetted Edward Snowden, The Post has learned.

Oaktree Capital Management and other lenders are a few weeks from a deal to grab control of Altegrity from private equity powerhouse Providence Equity Partners — only six months after Providence had refinanced the company’s $1.75 billion in loans, two sources close to the situation said.

While there is a “high chance” there will be a debt-for-equity swap, no deal has yet been reached and talks could fall apart, sources close to the matter warned.

Since the refinancing, there was a cyber-attack on Altegrity’s government background check division — USIS Investigations Services — and then Washington in September decided not to renew its roughly $300 million annual contract.

USIS has even paid to help transfer most of the business to rival KeyPoint Government Solutions.

USIS had been handling 40 percent of the government’s background checks — about 21,000 a month.

Altegrity is facing $70 million in debt payments in the first quarter, most of it due in January. It likely does not have the cash to make the payment.“I don’t know if they have much of a choice but to give up control,” a source close to the company said.

An Altegrity spokesman said, “Altegrity is continuing discussions with its lenders. During these discussions, we continue to operate our businesses and meet the needs of our clients, and we believe that we are taking the right steps to provide a solid foundation for a successful future.”

Jonathan Nelson’s Providence has sunk roughly $800 million into Altegrity, one of its biggest investments.