A community school which serves one of Scotland's most remote island communities has been the subject of a scathing report by inspectors.

The criticism from HM Inspectorate of Education (HMIE) centres on tensions between secondary teachers and their headteacher and his senior staff at Castlebay Community School on Barra, which they said was affecting pupils' education.

The situation was so bad that teachers and management refused to co-operate on efforts to improve the school, the report found.

However, inspectors went on to praise the attached primary school for the "positive relationships" between staff and pupils.

Inspectors visited the combined primary and secondary school, which has 62 primary pupils and 108 in the secondary department, in September last year.

Their report said that parents, children, and teachers had lost confidence in the secondary school, which was causing the children's education to suffer.

The inspectors discovered that pupils' reported attendance was well below the national average, with the morale of secondary staff and some secondary pupils described as "low". There were also high rates of staff absence and difficulties in filling vacant posts. The report stated: "Overall, pupils required greater encouragement and support to raise their self-esteem and expectations of themselves. Across the school, staff expectations of pupils' attainment, achievement and attendance were not consistently high. A significant number of secondary pupils did not feel that all pupils were treated fairly."

The report calls on staff to "direct their attention beyond internal tensions and focus on serving the needs and interests of the children of Barra".

In the majority of secondary classes, teachers were not found to meet the needs of all pupils effectively. The overall quality of attainment in Gaelic was weak, the report said, with mathematics and English attainment described as only "adequate".

However, there were a number of strong features of attainment in social subjects with inspectors stating: "Castlebay Community School had some strengths. Almost all primary pupils and most secondary pupils enjoyed school and came to school wanting to learn.

"They were polite and well-behaved in classes in both departments, although in the secondary department approaches to dealing with the few instances of poor behaviour were inconsistent."

The report said that the secondary school's headteacher, David Bowman, was hard-working and committed to improving the children's education, but had failed to communicate the importance of developing key aspects of the school's work to staff and parents.

Murdo Macleod, director of education for Western Isles Council, conceded that the school had a "considerable" number of issues to address.

"Without doubt the school faces a considerable number of challenges.

"There are a number of key strengths identified but also a considerable number of areas for development."

The school and the education authority have been asked to prepare an action plan indicating how they will address the main findings of the report, and to share that plan with parents.

HM inspectors will monitor progress, and will publish an interim report within the next year.