Disgraced former New England Patriot Aaron Hernandez may have left hidden wealth for his 5-year-old daughter beyond the reach of his creditors in a trust he set up before his prison suicide in April.

The “AJH Irrevocable Trust” came to light in documents filed in Bristol Probate and Family Court by attorney John G. Dugan, the special representative of Hernandez’s purportedly destitute estate.

A key purpose of irrevocable trusts is to protect beneficiaries from other claims because the creator relinquishes ownership and control of the assets set aside. The contents of the trust are also not public record.

Boston law firm Rubin and Rudman, which helped Hernandez set up the trust, was ordered last week by Judge Richard J. McMahon to turn over confidential “documents and related materials” that Dugan told McMahon he needed help to obtain, court records state.

McMahon held a closed-door hearing on the matter, slapped a gag order on those present, then took the extra step Friday of impounding a recording of what was discussed.

At the time of his 2013 arrest for the murder of Odin L. Lloyd, the Patriots had reportedly paid Hernandez more than $9 million of a new $40 million contract, yet Dugan warned in his filings that Hernandez’s estate “will probably be insolvent.”

He cited debts of $2.82 million, while declaring there is only $1.2 million in assets to pay any financial demands.

Trustee and attorney Matthew Berlin declined to say yesterday when Hernandez created the trust, whether Hernandez is named as a trustee or what worth is at stake. Berlin did confirm any assets protected are “not part of the probate estate” that is currently the target of three wrongful-death lawsuits, tax liens and mounting legal bills.

In his motion to close the hearing, Berlin wrote that Hernandez’s sole heir “is a minor child,” whose right to privacy, along with Hernandez’s confidential wishes, “far outweighs the interest of the public in having access to such information.”

Wakefield estate attorney Mark M. Curley, who is not associated with Hernandez’s case, said once the terms of an irrevocable trust are signed, “It’s virtually set in stone” and cannot be altered.

However, he said, a court can undo a trust under the state’s fraudulent conveyance act “if you squirrel assets away and put someone else in as a trustee and at the time you did it were having credit problems.”