ISLAMABAD - Nobel Peace Prize winner Malala Yousafzai left Pakistan for London on Monday after a four-day whirlwind visit back to her homeland, her first since militants nearly killed her in 2012, an official said.

Yousafzai and her family were taken to Islamabad airport in a security convoy and they boarded a London-bound flight, said aviation official Akmal Kayani.

Yousafzai, known by her first name, Malala, has been in Pakistan since Thursday, on her first trip home since Pakistani Taliban militants shot her in the head on her way home from school for advocating for greater education for girls.

After the attack, Yousafzai was airlifted abroad and underwent surgery.

Malala on Saturday visited her old home in the Swat valley, a mountain region northwest of Islamabad, which was under the control of the militants for about two years until the army launched an offensive to clear them out.

"I miss everything about Pakistan ... from the rivers, the mountains, to even the dirty streets and the garbage around our house," Malala, 20, told Reuters in an interview on Friday. urn:newsml:reuters.com:*:nL3N1RD036

A family friend said earlier Malala planned to return home after completing her education at Oxford University, where she is reading for a degree in politics, philosophy and economics.

Malala wrote an anonymous blog for the BBC Urdu service as a schoolgirl during the Taliban rule and later became outspoken in advocating more educational opportunities for girls.

In 2014, Malala became the youngest Nobel laureate, honoured for her work with the Malala Foundation, a charity she set up to support education advocacy groups with a focus on Pakistan, Nigeria, Jordan, Syria and Kenya.

(Reporting by Asif Shahzad Editing by Robert Birsel) ((asif.shahzad@thomsonreuters.com; +923018463683;))