One Thrift Savings Plan consideration for those nearing retirement is the status of any loans they have taken from their TSP accounts. While it’s generally known that loans may not be taken out after separation, there’s a potential tax trap for those who have an outstanding loan when they retire.

TSP loans fall into two categories. Loans for the purchase of a primary residence can be amortized over as many as 15 years. General purpose loans—which require not stated purpose—can be amortized over as many as four years; that will rise to five years when the TSP’s new computer system is operative next month. Loans are repaid through payroll allotments over the payment period specified in the loan agreement. You can prepay the loan in part or in full before the end of your loan repayment schedule without penalty.

If you leave service with an outstanding TSP loan, you must repay the loan in full, including interest. If you have not made that payment within 90 days, a “taxable distribution” of the unpaid loan amount will be declared, potentially subjecting you to significant tax penalties. A delay in repaying a loan also may affect the processing of a withdrawal.

Those who find a need for a lump-sum of money late in their working careers might want to consider taking out an age-based in-service withdrawal rather than a loan, so long as they are at least age 59 _. After that age, there is no early withdrawal tax penalty for taking out an in-service withdrawal. However, those who take out such a withdrawal will not be eligible for the partial withdrawals post-separation that will be allowed under the new computer system.