Seven-year-old Gaelic speaker Lachlan Brain and his parents Kathryn and Gregg have been granted permission to continue residing in the UK after a seven-month battle against deportation.

The Australian family, who live in Dingwall in the Scottish Highlands, have been attempting to qualify for a new visa since March, when they were told that the visa options open to them when they entered the country had been retroactively changed.

After two previous job offers fell through, Kathryn has now accepted a position as a museum curator and historian with Macdonald Hotels in Aviemore, making her eligible for a tier-two visa that will allow the family to remain in the country for a further year. The new visa will allow Lachlann to continue his education in Gaelic, the Celtic language native to Scotland that is very closely linked to Irish.

The Brain family moved from Australia to Dingwall five years ago as part of the Highland homecoming program, a scheme heavily advertised in Australia which encouraged those of Scottish descent to return to the country and help to repopulate the Highlands.

While the couple both have Scottish roots, Kathryn enrolled in a Scottish history and archaeology course to earn a student visa, listing her husband and son as dependants.

The family’s visa expired in December 2015 after Kathryn finished her degree and the Home Office rejected their case to stay. When the family first moved to Scotland they had planned to apply for a post-study work visa, a program which the government has since canceled.

Read more: Donald Trump probably learned Gaelic from his mother

Immense pressure was placed on the UK government to allow the young fluent Gaelic speaker to remain in the country, with the family’s local MP Ian Blackford becoming a vocal advocate for their case in British parliament.

Despite the British Immigration Minister James Brokenshire (now the Secretary of State for Northern Ireland) confirming the Brain family were in no immediate threat of deportation in May when part-time work was offered to Kathryn in a local distillery, it has taken another four months to confirm a year-long extension to their residency.

"I just can't describe how I feel. It's just been seven months now we've been without work and struggling and fighting through this whole process," Kathryn Brain told BBC Radio Scotland.

"We've got a brilliant employer on board who already has a sponsorship licence in place.

"They had to get a certificate of sponsorship for this particular position but the position itself meets all the criteria for the Home Office."

Although the cancellation of the post-study work visa Kathryn was originally to apply for was announced in March 2011, the Brain family claim they only learned of its scrapping months after arriving in Scotland in June 2011.

When the first student visa ended, Kathryn Brain applied for a further extension to stay under a tier 4 (student visa) until December 2015 and the family made an appeal under article 8 of the European convention on human rights – the right to a family life – to remain in Scotland.

This appeal was rejected in March 2016 and the family faced deportation, being granted three separate grace periods leading up to August 2016 when they informed the UK Home Office that Kathryn had received job offers which would qualify for a new visa.

The Brains to stay. Not merely justice for the family, but a victory for Scotland. Well done to @IBlackfordSNPMP, campaigners & supporters. pic.twitter.com/JFz2vESKfL

— Alex Salmond (@AlexSalmond) September 20, 2016

Victory for the Brains! I am delighted the home office have seen sense and allowed the family the right to remain. Thanks to all for support

— Ian Blackford (@IBlackfordSNPMP) September 20, 2016

On Tuesday, September 2, the tier 2 visa was confirmed.

"We have always been clear with the Brain family that if a suitable job offer was received an application to remain in the UK would be considered,” stated a spokesperson from the Home Office.

"We gave them a number of extensions on an exceptional basis to allow them to try to secure a job that would allow them to meet the Immigration Rules.

"Mrs Brain was subsequently offered a job with a hotel group.

"This has been considered and we are satisfied that it meets the conditions for a Tier 2 visa. Today we have written to Mrs Brain and confirmed that she and her family have been granted leave to remain in the UK."

Scotland’s First Minister Nicola Sturgeon was among those who placed pressure on the Home Office to allow the family to remain in Scotland.

"I'm glad the UK Government has finally seen sense on this occasion – but the Brains should not have had this cloud of uncertainty hanging over them for so long,” she said on hearing of the decision.

"This case also illustrates a wider issue, which is that the UK government must deliver an immigration system that meets Scotland's needs and which allows talented international graduates and others with key skills to remain in Scotland after their studies are complete. We will continue to press for this."

Seven-year-old Gaelic speaker Lachlan Brain and his parents Kathryn and Gregg. Facebook