Afghan officials said the deputy governor of southern Kandahar province was shot dead at a university where he was attending a class.

Authorities said Abdul Qadeem Patyall was killed Sunday after a gunman opened fire on him through the window of a classroom at Kandahar University.

The Associated Press said Patyall was studying to become a teacher.

President Ashraf Ghani sent condolences to Patyall's family and described his killing as a terrorist attack, the presidential palace said.

There has been no claim of responsibility for the attack.

However, the Taliban has increased attacks on officials and security forces as most coalition troops are preparing to leave Afghanistan by the end of the year.

In March, the governor's chief of staff was killed in a bombing claimed by the Taliban, while in July, a powerful ally of the president was assassinated at his heavily fortified home in Kandahar, Reuters reported.