Australia’s immigration department has overturned a “heartless” decision that left a Sydney teen who has autism facing imminent deportation.

Australian media report that 16-year-old Sumaya Bhuiyan, who has been living in the country with her family since 2009, was granted permanent residency Friday. Her mother, Dr. Nasrin Haque, who is originally from Bangladesh, had submitted a family application in 2013, but it was initially denied because Bhuiyan was found to have “mild to moderate” developmental delays, which were deemed a burden to Australian taxpayers.

Assistant Minister for Immigration Alex Hawke intervenes to stop deportation of Sydney girl with autism https://t.co/aTz2VcYNCF pic.twitter.com/KHruAiVnFJ — Breaking News Sydney (@SydneyBrk) February 24, 2017

Australia’s Migration Act specifies that “if any members of the family unit should fail to meet the Health Requirement ... no family member will be granted a visa,” meaning that, as a result of Bhuiyan’s condition, the family would have to move to Hungary, where Bhuiyan and her 14-year-old brother were born and have citizenship. Neither of them speak Hungarian, and Haque would have to leave two medical practices in Sydney.

The Department of Immigration and Border Protection had given the family until Friday to purchase plane tickets out of Australia ― and just two weeks to leave ― or they would be deported. The decision triggered outrage and was called “appalling and heartless” by autism awareness advocates.

Haque insisted that her daughter was not a financial burden to taxpayers in any way. Bhuiyan has never received financial support from the government and does not attend a special school, according to a Change.org petition Haque created to garner public support to appeal the decision.

“My full-time position as a [doctor] allows me to financially support my family without assistance from the Australian state,” she explained online. “Deportation would tear our family apart.”

Haque’s children have a very close relationship with their family members in Australia, she added. Their grandparents, aunts, uncles and cousins are all Australian citizens.

Assistant Immigration Minister Alex Hawke, just a month after he had rejected public pressure to do so, intervened Friday.

In granting Bhuijan permanent residency, Hawke said cases like hers are “always complex.” He is reportedly working toward granting the same status to Haque and her son.

“I feel better, much better today,” Haque said upon receiving the good news, according to The Sydney Morning Herald. “Really, I have been going through a stressful situation for so many months, it has been terrible. But this is great news.”

Jess covers world news for The Huffington Post. Follow her on Facebook and Twitter.