Nearly half (46%) of Gen Z workers — the oldest of whom are roughly 28 years old — have already tapped into their retirement savings, according to a recent survey by Payroll Integrations.

Of that group, 42% did so to pay down debt, the payroll software company found. Another 25% of Gen Z respondents used retirement savings to cover an emergency expense.

“It’s generally not advisable to use your retirement savings for anything other than retirement,” says Kevin Feig, a certified financial planner based in Massachusetts.

However, if you are dealing with high-interest debt like credit card balances, “it could be a worthwhile strategy,” he says.

Credit card debt can be overwhelming because interest rates — currently averaging about 24.36%, according to LendingTree — make any unpaid balances grow quickly. If you have enough stashed in your retirement savings, it may be tempting to wipe out your debt all at once, but it’s crucial to “understand the pros and cons” first, Feig says.