A new UN report says nearly half of Afghanistan's children are not attending school because of worsening security, poverty and gender inequality.

The United Nations Children's Fund (UNICEF) said in the report issued on Sunday that the number of children deprived of schooling was at its highest since 2002.

The study said that girls made up 60 percent of the 3.7 million children aged between seven and 17 not at school.

The figure rose as high as 85 percent in some of the worst-affected provinces of the violence-wracked country. It reflected pervasive gender-based discrimination in parts of the deeply conservative country.

Child marriages and a shortage of female teachers were additional factors keeping girls away from the classroom.

Elsewhere in the report, the UN body also estimated that up to 300,000 children were at risk of dropping out before the end of the year.

According to the report, those children most at risk often live in rural areas and face displacement, insecurity and lack of schooling facilities.

UNICEF's Afghanistan representative Adele Khodr has said, "Business as usual is not an option for Afghanistan if we are to fulfill the right to education for every child."

"When children are not in school, they are at an increased danger of abuse, exploitation and recruitment."

"Now is the time for a renewed commitment to provide girls and boys with the relevant learning opportunities they need to progress in life and to play a positive role in society."

While the numbers are worrying, the study also noted some progress. It said school dropout rates were low in comparison to neighboring countries such as Pakistan and Nepal, with some 85 percent of Afghan boys and girls who start primary school going on to complete the last grade.

The Taliban militant group has seized several districts across the country in recent years, as the US-backed government in Kabul has struggled to combat insurgency.

In April this year, Taliban militants set ablaze two schools and widespread violence led to the closure of hundreds of private schools.

A long-running financial crisis, exacerbated by widespread corruption, has further hindered government efforts to expand access to education in the Afghanistan.

According to the United Nations figures released earlier this year, more than 10,000 Afghan civilians were killed or wounded in the Afghan conflict last year. While the main cause of civilian deaths was said to be bombings by militants, the report said US airstrikes as well as government forces also inflicted a rising toll.

The United States and its allies invaded Afghanistan and toppled a ruling Taliban regime some 17 years ago. The ongoing war has failed to bring stability to the country despite the presence of thousands of foreign forces.