In the late 1990s, Ed McKinley fell in love with a $65,000 house by a lake in New Hampshire.
The owners let him move in early and pay rent until the buying process was completed.
Inside his new home, McKinley installed a modern stove, painted the walls and began to redo the floors.
Then came the bad news.
"The mortgage company decided that my income-to-debt ratio was a little bit higher than they were comfortable with," McKinley, 59, said.
They were referring to his $34,000 in federal student loan debt.
He had to pack up and leave.
"It's crushing," McKinley said, choking up. "I have a very strong desire to own a piece of land that I can put my signature on."
Student loan debt has become a major barrier to home ownership in America.
Some 45 million people in the United States carry student debt. The average borrower owes more than $30,000, according to Student Loan Hero, a website for managing education debt. Almost a fifth owe more than $100,000 , according to the National Association of Realtors.
People's monthly student loan payments can eat up a large slice of their income, threaten to push down their credit scores and make saving nearly impossible — all huge impediments, of course, to landing in a house.
For every 10 percent in student loan debt a person holds, their chance of home ownership drops between 1 and 2 percentage points during their first five years after school, according to the Federal Reserve.
More than 80 percent of people ages 22 to 35 with student debt who haven't bought a house yet blame their educational loans, according to the National Association of Realtors. Homeownership for young adults dropped to 40 percent in 2016, down from 43 percent in 2013, according to advocacy group Young Invincibles.
"Student loan debt holders do want to own a home, that's part of their American dream," said Jessica Lautz, managing director of survey research at the National Association of Realtors. "It's just really hard to get there right now."
To be sure, people who receive more education also tend to earn higher incomes, possibly offsetting some of the financial distress of student loan debt, said Jonathan Spader, a senior research associate at the Joint Center for Housing Studies at Harvard University.
"You have these competing influences of greater access to education versus reduced ability to buy a home because of student loan debt," Spader said.
Challenge one: debt-to-income ratio
Almost one-fifth of people with student debt who apply for a mortgage — like McKinley, are denied because of their "debt-to-income ratio," what a person owes versus how much they make, according to the National Association of Realtors.
The median income for student loan borrowers is $59,746, according to analysts at the Joint Center for Housing Studies at Harvard University. For borrowers under 30, the average monthly loan payment is $351, according to Student Loan Hero.
"The bank looks at it as 'unsecured debt'," said Doug Amis, a certified financial planner at Cardinal Retirement Planning in Cary, North Carolina. "With a mortgage, you have the asset of the house. If you stopped paying, you could foreclose on the house. But you can't go and foreclose on an education."
In other words: banks know you'll most likely be stuck with your student debt until you pay it off.
"The mortgage officer wants to see that your overall expenditures on housing and debt — including student loans and car payments — is not more than 36 percent of your income," Amis said. "That's really going to limit things if you're only making $50,000 a year."
In certain areas where the cost of living is higher, that debt ceiling is pushed up.
Challenge two: credit score
Eight percent of student loan borrowers are denied a mortgage because of their credit score, according to the National Association of Realtors.
Mike, a government worker in Yukon, Oklahoma, said banks offering loans would line up at his law school at the University of Toledo. (He asked to use his first name only because of his job with the government). He graduated in 2008, with more than $200,000 in debt, into the Great Recession.
He felt helpless.
"I just ignored it, there was no way — they were wanting $1,200 a month," Mike said.
His credit score sank into the low 500s, which is considered very poor by credit data company Experian.
"If I went into any bank in Oklahoma, they would just laugh at me," Mike said.
Challenge three: down payment
And he's not alone, 85 percent of student loan borrowers say difficulty in saving has delayed their ability to buy a house , according to the National Association of Realtors.
"It's challenging with student loans to be able to put together $40,000," said Grant Simmons, vice president of search marketing for Homes.com.
(The median home price in America is $241,700).
Stephanie Pennycuff graduated from Indiana University-Purdue University Indianapolis with $43,000 in student debt.
She works at a non-profit, helping formerly incarcerated people transition back into their communities, making around $30,000. Her monthly student loan payment is $450.
That's made accumulating money almost impossible.
"Pretty much one paycheck a month goes to loans," Pennycuff, 28, said. "Every time I manage to save up a couple of thousand dollars, something happens and it's immediately drained back to nothing. I can't put down any sort of payment on a home."
More from Personal Finance:
Trump opens a door to student loan forgiveness
College students use financial aid money to invest in bitcoin
Graduates of this college get a starting salary of $80,000
As student debt continues to compound, the primary way many Americans build wealth and stability — through owning a house — is likely to become more endangered.
In the two decades after McKinley was forced to leave, he's still been stuck renting. His loans have wavered in and out of default and mushroomed to more than $100,000.
Sometimes he drives past the house that was almost his.
"There was a lot of wildlife, opportunities for outdoor recreation," McKinley said. "It was really beautiful there."
He imagines what would have happened had he been able to stay. His monthly mortgage payments were going to be around $500 a month. He might have even paid them all off by now, he figures.
And the last time he checked, the house's value had swelled from $65,000 to more than $200,000.