KABUL -- Afghans are increasingly concerned about the lack of security and the country's economy amid an escalating war with the Taliban and rising unemployment, a survey released on Tuesday showed.

The San Francisco-based Asia Foundation found that 36.7 per cent of respondents in a nationwide survey conducted in June believe Afghanistan is moving in the right direction -- a significant drop from 54.7 per cent in 2014. It's the lowest level of optimism recorded by the foundation in the past 10 years.

Meanwhile, Afghan soldiers and intelligence agents on Tuesday raided a major university in the eastern city of Jalalabad, arresting 27 students on suspicion of having links to extremist groups, a local official said.

The Asia Foundation has been conducting annual surveys in Afghanistan for over 10 years. For this year's survey, it polled 9,586 Afghan citizens across 34 provinces, both men and women.

"Over half of the population thinks that Afghanistan is moving in the wrong direction," said Sayed Masood Sadat from the foundation as he presented the report in Kabul.

The reasons most often cited are insecurity, unemployment and corruption in the country, he added.

The survey shows that 42.7 per cent of those polled are concerned about the lack of security, up from 34.1 per cent last year and at its highest level since 2007. The poll had a 1.6 per cent margin of error.

This year, Afghanistan is facing major political and security challenges after the withdrawal of international combat troops at the end of 2014. Also, President Ashraf Ghani has been faced with a stepped-up war by the Taliban seeking to topple the government.

The poll found that more than two-thirds, or 67.4 per cent of Afghans, report that they "always, often or sometimes fear for their safety" -- the highest rate since 2006, according to previous foundation surveys.

Abdullah Ahmadzai, the Asia Foundation's representative in Afghanistan, said he hoped both the Afghan government and the international community can benefit from the finds of the survey.

The raid at Jalalabad's Nangarhar University followed a rally there last week during which students held banners of the Islamic State group and condemned the Kabul government.

Attaullah Khyogani, the provincial governor's spokesman, said some of those arrested had in their possession "paraphernalia of extremist groups" and were being interrogated for "involvement in anti-government activities."

The IS, which holds large swaths of territory in Syria and Iraq, is believed to have a presence in Nangarhar, especially near the border with Pakistan.

Associated Press writer Humayoon Babur in Kabul contributed to this report