Misbah Rana, also known as Molly Campbell, left her mother in Stornoway and travelled to Pakistan to be with her father in August but a judge in Lahore has ruled that she must return to her mother.
Here is a summary of key events in the custody battle.
THURSDAY 18 JANUARY
A court rules that Misbah Rana can remain in Pakistan after her parents reached a settlement.
The 12-year-old left her mother Louise Campbell's home in Scotland for her father Sajad Rana's home in Lahore six months ago.
WEDNESDAY 17 JANUARY
Misbah's father, Sajad Rana, rejects the terms of her mother's offer to settle out-of-court.
Louise Campbell was prepared to drop her claim for full custody of her daughter if Misbah was allowed to visit her in Scotland.
WEDNESDAY 10 JANUARY
Misbah's mother offers to drop her claim for full custody of her daughter provided she has regular contact with her.
FRIDAY 8 DECEMBER
Misbah's father Sajad lodges a new appeal with Islamabad Supreme Court asking that she be allowed to stay with him until her custody case is resolved.
Further proceedings are postponed until early January, delighting Misbah's father but disappointing her mother.
MONDAY 4 DECEMBER
Lahore High Court delays Misbah's planned return to Scotland to allow appeal proceedings.
Sajad Rana hopes to overturn a judge's order that his daughter should be returned to her mother in Stornoway, Isle of Lewis.
SATURDAY 2 DECEMBER
Lawyers for Misbah's father lodge an appeal against a court order to send her back to Scotland.
The schoolgirl earlier told the BBC she was "angry" and "scared" at the verdict of the high court in Lahore and declared she would not leave Pakistan.
WEDNESDAY 29 NOVEMBER
A judge in Pakistan rules that Misbah must return to her mother, three months after she left Stornoway.
FRIDAY 17 NOVEMBER
The judge rejects an out-of-court compromise involving her parents.
The proposed deal collapses in court after Mr Rana's lawyer insists that Misbah should only be allowed to see her mother in Pakistan and should not be allowed to return to Scotland for at least two years.
THURSDAY 2 NOVEMBER
A hearing is adjourned because Misbah's mother fails to attend court.
Louise Campbell's lawyers say she has not attended the hearing in Lahore because she failed to win legal aid.
However, they say she plans to travel to Pakistan for the civil hearing, which is adjourned until 17 November.
FRIDAY 27 OCTOBER
It emerges that Misbah's mother has been refused legal aid.
TUESDAY 10 OCTOBER
Misbah tells the Lahore high court that her mother had refused to allow her to perform Muslim prayers.
She also tells the hearing that she was unhappy with a new person in her mother's life.
MONDAY 9 OCTOBER
The youngster hands over her UK and Pakistani passports to a judge at Lahore high court, following a court order.
SATURDAY 30 SEPTEMBER
Misbah's father is granted temporary custody of her for a further three weeks.
Mr Rana is granted the extension in order to give time for his lawyer to reply to his former wife's objections.
TUESDAY 26 SEPTEMBER
A civil court in Lahore orders that Misbah should not leave its jurisdiction before another hearing in October.
TUESDAY 19 SEPTEMBER
Misbah's mother files a petition for her return with the high court in Lahore.
She alleges that her daughter has been "abducted" in an "illegal and improper manner" and is being detained "improperly".
FRIDAY 8 SEPTEMBER
Misbah's family in Pakistan files a court petition raising concerns that she may be deported from the country against her will.
The police chief in Lahore submits a statement to the court saying there has been no instruction to intervene in the case.
WEDNESDAY 6 SEPTEMBER
A judge in Pakistan grants Misbah's father an interim custody order until the end of September.
SATURDAY 2 SEPTEMBER
Misbah appears in court in Lahore and signs a statement saying she wants to remain in Pakistan.
The latest hearing in the custody battle is adjourned because her mother fails to attend court.
The judge grants Molly's father temporary custody until the following Wednesday.
FRIDAY 1 SEPTEMBER
Misbah tells a press conference in Lahore that she left Scotland of her own free will and that she wants to stay with her father in Pakistan. She insists that she wants to be known as Misbah Rana and not Molly Campbell.
THURSDAY 31 AUGUST
Misbah's mother flies to Glasgow to meet the MP Mohammed Sarwar.
Mr Sarwar travels to Pakistan to help mediate on the matter.
WEDNESDAY 30 AUGUST
The British High Commission in Pakistan joins the investigation. Staff in Islamabad say they are in contact with her mother's lawyers and police.
Mr Sarwar is asked to help trace the family in Pakistan.
Friends of Misbah's father say he is angry that the case has been portrayed as an abduction.
TUESDAY 29 AUGUST
Louise Campbell appeals to her former husband Sajad for Misbah's return.
The police search switches its focus to Pakistan.
MONDAY 28 AUGUST
Police in the Western Isles say they have launched an investigation into the possible abduction of Misbah.
FRIDAY 25 AUGUST
Misbah is met by her sister Tahmina outside her school in Stornoway and flies to Glasgow Airport.
Accompanied by her sister and father, she then boards a flight to Lahore in Pakistan.