THE number of young people learning to speak Gaelic has shown encouraging increases, but decline in its heartlands threatens the language's long-term viability, it has been warned.

Bord na Gaidhlig, the body charged with securing Gaelic's survival, said its annual report demonstrated it had "a positive and productive year".

Gaelic-medium education (GME) has seen a growth of 6.1 per cent at primary school level, with the number of children entering into primary one rising by 13 per cent to 486 entrants.

The number of pupils at ­secondary level rose by 7 per cent to reach 1,181.

Further growth was also seen in the early-years sector, with the number of parent and toddler groups and playgroups rising from 80 to 93.

New Gaelic-medium primaries are to be opened in Portree and Fort William, adding to a primary in Inverness and Glasgow's Gaelic School, which takes pupils all the way through primary and secondary.

John Angus MacKay, Bord na Gaidhlig's chief executive, said the growth in Gaelic education at all levels meant it had been an encouraging year.

He added: "The 2011 census results gave us very encouraging evidence that the number of Gaelic speakers (58,000) in Scotland has almost stabilised since the census of 2001 (59,000). This is mainly due to the rise in Gaelic-medium education, which has seen excellent growth since its inception in 1985.

"The trend shows that within the next 10 years the long-term decline of the language could be reversed."

However Bord na Gaidhlig's chairman Iain Campbell underlined the continuing challenge Gaelic faced in traditional areas such as the Western Isles. He said the census results had also shown there had been a small increase in the number of people under 20 who could speak the language.

"That in itself should give us hope and confidence as we look to the future," he said. "However, although the figures in general were encouraging, the number of Gaelic speakers in rural areas continues to decline and especially in the Western Isles. This represents a very significant danger to the long-term viability of the language in Scotland.

"More work needs to be done in the island and rural communities to reverse this trend and create a healthier situation for Gaelic in these areas."

The problem in many of these areas is that as indigenous Gaels die, they are not being replaced by younger speakers in sufficient numbers.

But Minister for Scotland's Languages Dr Alasdair Allan, the MSP for the Western Isles who has himself learnt the language to fluency, said parents across the country had clearly recognised the benefits of a bilingual education for their children and that the rolls for Gaelic schools and units continued to grow.

He said the figures showed what could be achieved with targeted investment, adding: "We are currently consulting on the provision of GME across ­Scotland and will look at the successes so far and how we can continue to build on our achievements."