Media playback is unsupported on your device Media caption The BBC's Richard Galpin reports from Birmingham where Malala Yousafzai is being treated

The 14-year-old Pakistani girl shot in the head by Taliban gunmen is being flown to the UK for medical treatment.

Malala Yousafzai has until now been at a military hospital in Rawalpindi, with doctors saying her progress over the next few days would be "critical".

She remains in a serious condition after the attack, which the Taliban said they had carried out because she had been "promoting secularism".

Pakistan's interior minister has said the attack was planned abroad.

Those involved would soon be caught, said Rehman Malik, without giving further details.

Bone damage

Malala left Pakistan on board an air ambulance provided by the United Arab Emirates, accompanied by a full medical team.

Details of her departure were not announced until she had already left the country because of security concerns.

The plane spent several hours in Abu Dhabi before flying on to the UK. It was not immediately clear whether any of her family were travelling with her.

Pakistan's ambassador to the Emirates, Jamil Ahmed Khan, said he had seen Malala before the plane resumed its journey, and told local media that her recovery was "very steady".

She will be treated at the Queen Elizabeth Hospital in Birmingham - an NHS (National Health Service) hospital with a major trauma centre specialising in both gunshot wounds and head injuries.

The cost of her care and rehabilitation is being met by Pakistan.

The bullet which hit Malala's skull was removed last week, during surgery in Peshawar which had saved her life, the Pakistani military said.

I felt hurt on opening my wardrobe and seeing my uniform, school bag and geometry box. Boys' schools are opening tomorrow, but the Taliban have banned girls' education Malala Yousafzai, Diary entry, 8 February 2009 Diary of a Pakistani schoolgirl Swat women on changing life

In a statement, the military said her condition had since been stabilised by doctors in Rawalpindi.

Doctors had advised that if she were to be moved abroad, it should be "during this time window whilst her condition was optimal and before any unforeseen complications had set in," the statement added.

"The panel of doctors recommended that Malala be shifted abroad to a UK centre which has the capability to provide integrated care to children who have sustained severe injury," it said.

Once she has recovered sufficiently, she is expected to need treatment to repair or replace damaged bones in her skull and to undergo neurological treatment.

The BBC's Aleem Maqbool, in Islamabad, says Malala has been kept sedated and on a ventilator since she was taken to hospital, with tight security around her.

The ventilator was removed briefly over the weekend to see how she coped and doctors have presumably determined she is well enough to travel, says our correspondent.

Pakistan had previously insisted Malala could be treated in her home country.

UN petition

Media playback is unsupported on your device Media caption UK Foreign Secretary William Hague: "It was a cowardly attack on her and her school friends"

Malala gained attention aged 11, when she started writing a diary for BBC Urdu about life under the Taliban.

Using the pen-name Gul Makai, she wrote about suffering caused by militants who had taken control of the Swat Valley in 2007 and ordered girls' schools to close.

The Taliban were ousted from Swat in 2009, but Malala continued to receive death threats. Then last Tuesday, she was attacked as she returned home from school in Mingora, north-western Swat.

Two armed men on foot stopped a van packed with about a dozen schoolgirls in a congested area of the town.

One of them got into the van and asked which of the girls was Malala Yousafzai before he fired three shots, hitting Malala in the head and injuring two others.

The Taliban have said they will target her again.

Protests have been held in several Pakistani cities to condemn the Taliban's actions, including in Karachi, where tens of thousands of people turned out on Sunday.

Four people have been arrested in connection with the shooting. They were among about 100 people rounded up this week, most of whom were later released on bail.

The UK's Foreign Secretary William Hague said the attack had "shocked Pakistan and the world" and that Malala's bravery was "an example to us all".

"The public revulsion and condemnation of this cowardly attack shows that the people of Pakistan will not be beaten by terrorists," he said. "The UK stands shoulder to shoulder with Pakistan in its fight against terrorism."

On Monday, former British Prime Minister Gordon Brown - now the UN's Special Envoy for Global Education - said he was launching a petition in Malala's name "in support of what Malala fought for".

"The petition calls on Pakistan to ensure that every girl like Malala has the chance to go to school," he said, while also calling on the international community to ensure all children have access to education by the end of 2015.

Mr Brown said he would hand the petition to Pakistan's President Asif Ali Zardari when he visits Islamabad in November.