PESHAWAR, Pakistan -- A prominent Pakistani Taliban commander has written a letter to a teenage girl shot in the head by the group, expressing regrets that he didn't warn her before the assassination attempt that propelled her activism to the international stage.

The letter from Adnan Rasheed, however, didn't apologize for the October attack that left Malala Yousafzai gravely wounded. Rasheed, who has close relations with Taliban leaders, only said that he found the shooting "shocking" and wished it hadn't happened.

Rasheed said he would leave it up to God to decide whether the outspoken activist for girls' education should have been targeted.

"You have said in your speech yesterday that pen is mightier than sword," Rasheed wrote in reference to Malala's speech Friday at the United Nations, "so they attacked you for your sword not for your books or school."

Rasheed said the letter received by The Associated Press late Tuesday night expressed his own opinion, not that of the militant group. The AP spoke to another Taliban commander Wednesday who confirmed the letter, written in English, was authentic.

Malala was 15 years old when she and two of her friends were attacked on their way home from school in Pakistan's northwest Swat Valley. The assassination attempt sparked worldwide condemnation. Malala celebrated her 16th birthday last week by giving a speech at the U.N. in New York, telling the body that the attack gave her new courage while demanding world leaders provide free education to all children.

Rasheed said the Taliban did not attack Malala because she was a proponent for girls' education, but because she was critical of the militant group when it took over much of Swat in 2008 and 2009. That mirrors what some militants said at the time of the shooting.

Rasheed, who the Taliban broke out of prison last year, said the militants supported both boys and girls going to school as long as they received an Islamic education and didn't study what he called a "satanic or secular curriculum." Malala wrote in a blog for the BBC at the time the Taliban controlled Swat about how many students moved out of the valley after the Taliban issued an edict banning girls from school.

The Taliban have kidnapped and shot other education activists like Malala and also have blown up hundreds of schools in Pakistan's northwest. The Pakistani army launched a large offensive against the Taliban in Swat in the spring of 2009 and drove out many of the militants, but they have continued periodic attacks.

Rasheed said the Taliban only blow up schools that Pakistani soldiers use as hideouts. Teachers and activists say this is only partly true. Some were targeted because they were used by the military, but many of the attacks were motivated by the Taliban's opposition to girls' education and schooling that doesn't follow their strict interpretation of Islam, the teachers and activists say.

Rasheed also justified recent attacks in Pakistan on health workers providing children with polio vaccinations, claiming the West is trying to sterilize Muslims. The Taliban have denied carrying out such attacks in the past.

The Taliban commander also criticized the U.N. honouring Malala as he said the world ignores civilians being killed in U.S. drone attacks in Pakistan's northwest. The U.N. is currently conducting an investigation into allegations of civilian casualties from U.S. drone attacks.

Former British prime minister Gordon Brown, now a UN special envoy on global education, criticized Rasheed for writing the letter while the Taliban continues to attack schools.

"Nobody will believe a word the Taliban say about the right of girls like Malala to go to school until they stop burning down schools and stop massacring pupils," Brown said in a statement.

While not apologizing for the attack, Rasheed offered Malala education advice, urging her to return to Pakistan and enrol in an Islamic school for women.

"Use your pen for Islam and plight of Muslim ummah (community) and reveal the conspiracy of tiny elite who want to enslave the whole humanity for their evil agendas in the name of new world order," Rasheed wrote.