An NHS doctor allegedly held captive by her parents was freed by a Bangladesh court today in a landmark legal victory under the UK's Forced Marriage Act.

Dr Humayra Abedin, 33, from east London, was brought before the high court in the capital, Dhaka, after five previousrequests had been defied by her family. She is expected to fly back to the UK this week.

Human rights groups hope the case will set a strong international precedent and deter families who might be planning similar courses of action.

There was confusion about the immediate effect of the order, which is believed to be the first ever issued at the behest of British authorities on behalf of a non-national.

Abedin is a Bangladeshi but the judge nonetheless ordered she be placed under court protection until a representative from the British high commission comes to collect her. No UK representative was in court.

The 2007 Forced Marriage Act was designed to protect vulnerable individuals coerced into legally binding partnerships against their will. Most cases dealt with by the Foreign Office's Forced Marriage Unit involve families with Asian connections. The department has so far helped in 180 such disputes overseas.

Justice Syed Mohmed Hossain told the court: "[Dr Abedin] requested the court not to put her parents in trouble because of what they did to her … Children are not the slaves of their parents, they must have their own freedoms."

Setting a deadline of this afternoon for Dr Abedin's parents to return her passport and credit cards, he added: "What I have heard reminds me of the dark times, the old ages we had in Bangladesh."

If Abedin's family had failed to comply they could have been imprisoned.

Abedin arrived in the UK six years ago to study for a master's degree in public health at Leeds University. She moved to London and was training to become a registrar at a GP surgery in east London.

During the summer she was told her mother was ill and returned to Dhaka. The alarm over her disappearance was raised reportedly after a friend in East Ham received a text message from her saying: "Please help me. My life is in danger."

The Foreign Office subsequently issued a protection order under the Forced Marriage Act. The order may not technically be enforceable overseas — due to Abedin's nationality — but was granted, the FO said, in the hope it might "carry some weight" with the Bangladeshi court system.

The Foreign Office said: "Dr Abedin is a Bangladeshi national so we cannot offer her formal consular assistance. However, we will meet her to hear her story and establish the recommendations of the court order."

As the judge gave his verdict, she sat quietly at the front of the court as her father, Mohammad Joynal Abedin, broke down in tears. Her parents were allegedly aggrieved by her rejection of a husband they had found for her in Bangladesh.

The father, along with the mother, Sufiya Kamal, had refused to bring the doctor to the court, saying she was mentally incapacitated. Today was the first time she had been seen by the court. Only her parents' lawyers and lawyers acting for ASK, a Bangladesh human rights group, and Abedin's cousin were present.

A Bangladeshi human rights lawyer, Sara Hossain, who represented ASK, and members of the Abedin family opposed to the doctor's treatment, said afterwards: "She's free to go, she's been set at liberty and she wants to return to the UK. Her family has been ordered to return her passport.

"We're delighted with the result, the rights of a Bangladeshi woman have been protected as they should be. Dr Abedin looks very relieved."

Anne-Marie Hutchinson, the lawyer who acted for Abedin in the UK, said: "Humayra is elated. Exhausted, but elated. She is very very tired, she is emotional.

"She appeared before the court today and told them she was being held against her will and that she wanted to leave. She didn't want to bring charges against her parents."