The 27-year-old dispute was finally settled in June during UN-brokered talks
NATO Sec Gen said it was a "historic day" which will lead to Macedonia becoming the 30th alliance member
Greek prime minister hails ratification of the name change by parliament as 'historic day'
Tens of thousands of people rallied against the settlement in Athens earlier this week
Hundreds of buses, especially from northern Greece had brought protesters in for the rally
The proposal faces resistance in Greece, which has a northern province of same name
Agreement needs backing from Greek parliament to come into effect
Eighty-one deputies in the 120-seat parliament vote in favour
With only a third of the electorate voting
The referendum is one of the last hurdles for a deal reached between Macedonia and Greece