(CNN) Maine draws about 36 million tourists each year with four seasons' worth of enticements, from white sandy beaches to world-class skiing.

But the northeasternmost US state can't seem to get enough young people to move there.

So, officials have hit upon the ultimate incentive: Move to Maine, and they'll help you pay off your student loans.

How the program works

The program started in 2008 as a retention tool for young professionals already living in Maine. The Educational Opportunity Tax Credit program targeted Maine college grads and allowed them to use their loan payments as tax credits.

"Over time, the employer community spoke out loud and clear that even if 100% of college graduates in Maine chose to stay here and work, that still (wouldn't) fulfill our workforce need," Nate Wildes, engagement director for the private-sector initiative Live + Work in Maine, told CNN.

When you move to Maine, the money you spend toward paying your student loan debt each year is subtracted from your state income taxes.

For instance, if you pay $1,800 toward your loan and owe the state $2,000 in taxes, you'll only end up paying Maine $200.

"We need to import people," Wildes said. "We need to attract people from other states for our workforce."

STEM majors -- who study science, technology, engineering and math -- could even get a check back from the government -- if their loan payoff amount outweighs their taxes. Non-STEM majors fall under a non-refundable tax credit program, which means they'd owe $0 in state taxes under the same scenario.

How the program helps

Matthew Glatz was a STEM major when he graduated with a bachelor's degree from the University of Southern Maine. He was also $60,000 deep in student loans, he told CNN.

After graduation, Glatz wasted no time to sign up for the tax credit program, he said. He now owns his own catering and food truck company, SaltBox Cafe, and since he's self-employed, has greater control of his student loan payments and refund amounts.

Most college graduates in Maine, he said, are well aware of the program -- and more people out of the state need to find out.

"It's fantastic," Glatz said. "Maine is a great place to live and work, and any incentive you have to show people that and make them realize that is a benefit."

Why Maine needs to attract workers

The Pine Tree State leads the charts with the oldest population in the nation. The median age in Maine is 44, five years older than the median age across the rest of the US.

So, state lawmakers decided they needed a way to start bringing in young minds to the workforce.

"This is a substantial financial investment by the state, many millions of dollars," Wildes said. "But we recognize that student loans are a big financial burden and emotional burden."

"The message to employees is: We appreciate all you've done to invest in yourself, we'd like to put that talent to work and award you by not only giving you a job but by alleviating your student debt."

Wildes knows because he moved to Maine partly because of the initiative.

"The tax credit program was the gravy to make that transition much easier," he said. "This speaks to financial perks but also of the culture in Maine."

It's the only statewide program of its kind, he said. Similar programs are tied to individual schools or geographical areas.

"In that perspective, Maine is light-years ahead," Wildes said. "It's by far the most general universal tax relief program in the United States."