No parent wants to consider the possibility of their child dying as a young adult, but, sadly, it happens. And while an untimely death is devastating, it can sink families financially if they’ve co-signed steep private student loans for their child to attend college.

With a private college education costing upwards of $60,000 per year and a state university education typically between $20,000 and $30,000, many students take out loans to help with costs, but sometimes federal loans don’t cover enough, and some families turn to private loans, which typically require a co-signer.

Related: Need Student Loan Forgiveness? Try These Programs

Here’s the thing: If your student passes away owing payments on those private loans, the co-signer is on the hook for repayment, and sometimes the payment schedule may be accelerated. In some instances, death may trigger the lender to require immediate full repayment. (A co-signed loan also can be dangerous for the student if the co-signer dies.)

“In the event of a student’s death, the liability of the loan will transfer to the parent 100 percent, and even more dangerous, student loans cannot be discharged even in the case of bankruptcy,” says Laura Adams, senior insurance analyst for InsuranceQuotes.

The same is not true for federal student loans. If a student passes away owing payments on federal loans, those loans will be discharged, according to the Department of Education. Even parent PLUS loans (federal loans that parents or graduate students may take out) may be discharged in the event the parent borrower or the student dies. (Bear in mind, the IRS will likely expect the forgiven loan amount to be reported as income by the estate.)

Related: Education Tax Breaks Parents of College Students Should Know About

A life insurance policy can help

Before purchasing a life insurance policy for your child, double check with your student loan lender to see if loans would be discharged in the event of death. If your lender doesn’t discharge loans, consider a term policy, which allows you to choose the length of coverage, say 10 or 20 years, and the amount.

“Getting a 10-year-term life insurance policy can be the perfect solution. It’s inexpensive, and it will cover the parent for just the amount of time they would be in danger financially,” Adams says. “You want the policy payout to be high enough to cover the full balance of the loan, including accrued interest. Look at the annual out-of-pocket expense to carry the loan and multiply that by 10. That’s the amount you want the policy to cover.”

Life insurance policies on young, healthy adults are cheap, as low as $83 per year for an 18-year-old, depending on length of term and amount you’re insuring for. “People routinely overestimate the cost of life insurance,” Adams says. “That holds them back from moving forward with this safety net.”

Related: 4 Legal Documents Your 18-Year-Old Might Want to Have

Students also should name the co-signer as the beneficiary because then this person, presumably you, is paid outright by the life insurance company in the event of the student’s death.

Joanna Nesbit is a freelance writer specializing in education, parenting, lifestyle and family travel.