Gretna are to end a 55-year spell in English football to replace the now-defunct Airdrieonians in the Scottish Football League.
Chairmen from the 27 SFL clubs entitled to vote plumped for the UniBond League side ahead of six other applicants.
One was Airdrie United, the football club that existed only on paper but was desperate to be allowed to keep senior football alive in the Lanarkshire town.
The voting went to a second ballot, with Gretna having won the most votes first time round but not enough to secure a majority of 14.
That was achieved in the second ballot, with Gretna polling 16 ahead of Airdrie United's 11.
Now Gretna will kick off their new career back in their homeland with a Third Division home match against Morton on 3 August.
SFL secretary Peter Donald said: "I am delighted to say Gretna are with us and the community of Scottish football has expanded to the edge of the country."
Gretna secretary Ron MacGregor added: "It is a great day for Gretna Football Club. We can now come back to Scotland."
Airdrie United chairman Jim Ballantyne could not hide his disappointment and questioned whether the SFL chairmen had made the right decision.
He said: "I am adamant that Airdrie had more to offer Scottish Football than our rivals, but the Scottish League chairmen thought otherwise – and I have to accept that."
Ballantyne wished Gretna well as he pondered the future of football in the town.
"I am desperately disappointed by this decision, not just for myself and my fellow directors but, most importantly, for the people of Airdrie.
"They wanted to continue the town's 124-year association with senior football, and the whole community – people in the street, politicians and businesses – were 100 per cent behind us.
"Yes, it's hurting but I do congratulate Gretna on their victory today and I genuinely wish them well in the Bell's Third Division."
Gala Fairydean, Preston Athletic, Cove Rangers, Huntly and Edinburgh City were the other disappointed candidates.