It will cost £70,000 to hire and site the unit for three years but it will mean the school will be able to accommodate up to 368 pupils.
It currently has room for 308 but already has 306 enrolled for August.
Meanwhile, council officials will continue to monitor the situation in Gretna as more house building takes place.
And, if the roll continues to rise, they will consider building a new classroom or even a whole new school for approximately £14 million. Education officer Laran Foss said: “Should the projected school roll for Gretna Primary School be above the capacity, 308, then temporary accommodation would be procured and sited in proximity to the main building, to allow for shared use of the associated spaces such as dining facilities.
“The additional classroom unit would consist of two class bases thus increasing the school capacity by 60, to 368.”
He added: “Should the number of pupils prove stable over a number of years then the temporary accommodation would be removed and a permanent solution put in place.
“If pupil numbers do not stabilise and continue to grow beyond the additional 60 places, then there is the option to add one further classroom on a temporary basis, taking the school capacity up to 398. It would not be feasible to go beyond this capacity as the non-teaching accommodation would be unable to cater for the number of pupils.”
Annandale East Councillor Karen Carruthers thanked officials for coming up with a solution ‘before Gretna hits crisis point’.
Meanwhile, Gretna Community Council chairman Alex Thomson called the decision “better than nothing for the moment”, adding: “We all know that it’s not the answer, we need a new school just like Lockerbie and Moffat got new academies.
“Gretna is getting bigger and bigger and if they keep building house after house we need the infrastructure to go with it.
“It seems to me that the council are just firefighting and waiting for something to happen ‘til they have to do something about it.”
Fellow community councillor Kirsten Herbst-Gray agreed and said: “Gretna Primary serves an ever-growing and expanding community that deserves more than adding a couple of classrooms in a portable building. The township needs a new primary school with a 3G pitch – and a 25 metre swimming pool that could also be used on a membership basis.
“There is enough space and enough will for such an ambitious project. The question is – will the council be ambitious enough?”