OTTAWA -- Elidee Sanchez says her nightmares about her harrowing journey crossing the Mexico-U.S. border finally came to an end the day she arrived -- legally -- in Canada.

After spending 17 years living in the United States as an undocumented migrant, she was in an almost constant state of anxiety. She had no legal status in a country that has been developing an increasingly hostile view of "illegal" migrants.

But last August, Sanchez drove across the Blue Water Bridge that connects Port Huron, Mich., with Sarnia, Ont. and was granted legal entry into Canada, thanks to a successful application for a Canadian study visa despite her undocumented status.

"That's the first time I've ever had a stamp in my passport," she exclaimed to the border security officer as she crossed.

It was a milestone in Sanchez's life that her immigration lawyer, Vanessa Routley, said would not have happened three years ago.

As an undocumented migrant living for so many years illegally in the United States, her application for a temporary Canadian visa would likely have been denied, Routley said.

"In the past, if someone had failed to comply with the regulations in another country, Canada was not willing to take a chance on them, to admit them and to ask them to follow our rules," Routley said.

But over the last few years the Canadian government might have quietly revised its approach to some of these applications.

"There was a low-level rumour circulating that it's possible to bring these people in both for study permits and job offers," Routley said, which is why she moved forward with Sanchez's application. She said she would not have taken the case in the past, given the low probability of success.

"I knew there was a chance that (Sanchez) could be refused, but there seemed to be a new willingness on the part of Immigration, Refugee and Citizenship Canada to give preferential treatment to people who would otherwise do an irregular (border) entry, but were clearly trying to comply with the regulations and do it through legal pathways."

Routley had had success with another client, who also was living in the U.S. undocumented. He was able to use his unofficial work history in the U.S. to support his application for a temporary work visa in Canada. She said she has heard of other similar cases from 2017 from other lawyers.

The Immigration Department said there has been no official change in the requirements for temporary Canadian visas and would not comment on individual cases, citing privacy laws.

The department did say each application is considered on the specific facts presented by the applicant. As long as they show the applicant is not criminally inadmissible, is in good health, can financially support him- or herself and has all the required paperwork, and he or she agrees to leave the country when the visa expires, the applicant can be granted access to Canada.

In other words, nothing precludes an undocumented migrant from being granted a temporary visa as long as he or she meets all other requirements of the Immigration and Refugee Protection Act.

Routley says she believes Canada may be trying to reward those who are legally trying to enter Canada, given the spike in irregular border-crossers coming to Canada from the U.S. via non-official ports of entry. That has led to a two-year backlog of refugee claims and public and political concerns raised about Canada's border system.

She wants more undocumented migrants to know this could be an option for them, but understands there could be reasons why the government might not be making any change with a lot of fanfare.

"With the political atmosphere between the Canadian and U.S. government, I don't think the federal government wants to be perceived as rolling out the welcome mat for people who were essentially illegal workers in the U.S.A.," she said. "It might also be a bit of a floodgates rationale in that... it could start a stampede."

In her application, Sanchez was honest about her undocumented status, explaining she had crossed into the U.S. from Mexico at the age of 17, making the dangerous journey across the Rio Grande under a false belief she could eventually normalize her status in the United States.

But living undocumented in the U.S. was instead a lifelong hardship.

"Just the frustration and the nightmares and the inability to even be able to get a regular driver's license -- my driver's license was a different colour and I couldn't even buy liquor with it because it said in big letters 'Not valid' ... I spent half of my life not being able to move forward."

That's why, when she was granted legal status in Canada this summer to pursue a master's degree, it was life-altering.

"It was kind of like a dream. It didn't hit me until woke up in my hotel the next day in Toronto," she said.

"I haven't had nightmares since I arrived in Canada, which is pretty amazing."