When Takiia Anderson graduated from Boston College Law School in 1999, she was a single mom with a 2-year-old child, nearly $100,000 in student loans and a new job as a government attorney that paid $34,102 a year. She didn’t like that math.

“People are talking about 20 years to pay off a student loan, and my daughter is going to college in 16 years,” recalls Anderson, now 47 and based in Atlanta. “I didn’t want to be in a situation where I’m helping her pay for college while I’m still paying my student loan.”

Today, Anderson’s student debt is long gone. She has nearly $500,000 in retirement savings, and her daughter, Taje Perkins, finished her third year at Spelman College in Atlanta with no student loans to cover its nearly $30,000 per year in tuition and fees.

How did she do it? She set a series of targets and kept a laser-like focus on them that, even though she later became a high-earner and has ridden a surging stock market, can serve as a lesson to others today.

“Any time I got a raise, a bonus or a tax refund, I put it toward my debt, my daughter’s education savings and then retirement,” Anderson says.

Tough choice: Save for retirement or college?

Many financial advisers would advise flipping those last two priorities: “The same way that airplane announcements tell us parents should put on their own oxygen masks before assisting their children, parents should prioritize saving for retirement and putting themselves in a good financial position before saving for their children’s education,” says Paul R. Ruedi, CEO of Ruedi Wealth Management in Plano, Texas.

Yet more parents like Anderson are prioritizing saving for college over retirement — 56 percent are doing the former vs. 54 percent the latter, according to a recent survey by Sallie Mae , one of the nation’s largest student loan lenders.

“Although college wasn’t as expensive when I went in 1989, I know what it’s like not to have to pay those bills, and that’s what I wanted for her,” says Anderson, a Howard University graduate.

Tackling her big debt first

Anderson attacked her student loan debt first with single-minded determination.

“We didn’t have cable. No internet,” she recalls, adding that instead they watched old or borrowed DVDs and VHS tapes. “I was literally living in overdraft protection. But I was paying my bills on time. I drove the same car for 12 years, cooked at home and packed lunches.”

As her salary increased and she was promoted to roles with the US Department of Labor in Maryland, Philadelphia and Atlanta, she pumped more cash toward her debt.

“Even when I was making low six figures, I was renting $1,200 apartments — a lot of money for some people, but much less than I could afford,” she says.

In the end, Anderson was able to pay off her $100,000 in debt in nine years rather than 20.

College saving: From $135 in change to $12K a year

Anderson began saving for her daughter’s education when Taje was 3 years old. She started small. Following advice she heard on “Oprah,” Anderson paid for daily expenses in cash and at the end of each day threw change in a drawer. After one year, she had $135 that she used to open a savings account for Taje. She later rolled that into a 529 college savings plan and began contributing $50 a month.

Once Anderson paid off her student loans and credit cards in 2008, she began saving $12,000 a year toward her daughter’s education. By the time Taje started college, Anderson had saved $56,000 and added another $22,000 during her first years.

But to do so, Anderson quit contributing to her government retirement plan for two years — a move most financial advisers would caution against.

“Fortunately, the two years I didn’t contribute to my retirement plan was during the financial crisis,” she says. In 2010, she resumed contributing to her employer-sponsored retirement plan up to the legal limit — $16,500 a year at that time — “to catch up,” she says.

Anderson’s max contributions have aligned nicely with the current nine-year bull market, in which the S&P 500 index has seen annualized returns of about 10 percent.

Debt-free means more life choice

Some might view Anderson’s story as one of sacrifice, but she believes that aggressively paying down her debt has brought her freedom, like the opportunity to choose early retirement this year after working 20 years with the government.

Anderson has $15,000 in emergency savings, owns a home and is doing contract legal work to keep earning some money. She also writes a personal finance blog, “The Frugal Biddy.” Her daughter has begun her last year in college, and she will be taking over payments from her mother and getting student loans to finish her degree.

Dedicating five or 10 years of a career to pay down debt “may seem to some that they are losing their life, but what they don’t realize is how much they gain,” says Anderson.