The family of a girl shot in the head by the Taliban for promoting women's rights will be able to stay in the UK, after her father was appointed education attache at the Pakistan consulate in Birmingham.

Malala Yousafzai, 15, was shot in an assassination attempt in Pakistan in October.

She was taken to hospital in Pakistan and later flown to the UK for specialist treatment at Birmingham's Queen Elizabeth Hospital, where she is recovering.

The Pakistani Government has been looking after the family's needs, and has now appointed Malala's father Ziauddin Yousafzai education attache at the consulate in Birmingham.

The appointment, which is initially for three years, with a further potential extension of two years, effectively means the family can stay in the UK for the foreseeable future.

The Taliban in Pakistan has threatened the lives of both Mr Yousafzai and Malala, since the shooting.

The Pakistani Government, in a statement, said: "Mr Ziauddin Yousafzai has been appointed as education attache in the Consulate of Pakistan, in Birmingham.

"The Government of Pakistan has been pleased to appoint Mr Ziauddin Yousafzai, father of Malala Yousafzai, as attache.

"The tenure of his office shall be initially for three years extendable for a further period of two years.

"The tenure will start from the date he assumes the charge.

"Mr Ziauddin Yousafzai will function as head of the education section under head of the mission."

In December the president of Pakistan Asif Ali Zardari visited Malala in hospital and assured Mr Yousafzai his government would meet all the expenses of Malala's treatment and all the needs of the family while in UK.

The statement continued: "The president had also directed high commissioner Mr Wajid Shamsul Hasan to look after all the needs of Malala, and discuss with Mr Yousafzai a mode for financial sustenance and accommodation of the family.

"In light of that, the present appointment has been made."

The Pakistani government has been paying for the "treatment and maintenance" of Malala's family since she arrived in the UK.