A hospital doctor carried out female genital mutilation on a young mother after the birth of her first child in a London hospital, a court has heard .

Mounting the first prosecution against someone for carrying out FGM in England and Wales, the Crown alleged that Dr Dhanuson Dharmasena, a junior registrar in obstetrics and gynaecology at the Whittington hospital, had mutilated a 24-year-old mother by the manner in which he had sewn her up after childbirth.

The woman had undergone type 3 FGM – in which part of the labia are sewn together – as a child in Africa, and during labour the doctor had made two cuts to her vaginal opening to ensure the safe delivery of her baby. When Dharmasena sewed her up, a midwife warned him that what he had done was illegal. He asked a consultant for advice, and the more senior doctor said it would be “painful and humiliating” to remove the stitch he had made, and it remained in place, the court heard.

“It is the stitching back together by Dr Dharmasena which the prosecution says is an offence under the act,” Kate Bex, prosecuting, told Southwark crown court.

Dharmasena, 32, is charged alongside another man, Hasan Mohamed, 41, who is accused of aiding and abetting the doctor. Both men deny the charges.

The doctor, who qualified in 2005, and began specialising in obstetrics and gynaecology in 2008, had been at the Whittington for a month when the events took place in 2012.

Under the 2003 Female Genital Mutilation Act, a doctor does not commit an offence if his actions involve a surgical operation on a woman in any stage of labour, or immediately after birth, for purposes connected with the labour or birth.

Bex told the jury of seven women and five men: “It will be for you to decide if Dr Dharmasena’s admitted act of sewing [her] labia together was necessary for her physical health or was for purposes connected with the labour or birth.”

She said the case was not what might be expected of an FGM prosecution. “If you do know a little about FGM you may be expecting to hear that the offence took place in a back-street clinic by an unqualified and uncaring person on a young child. This trial is quite different but it nevertheless involves FGM.”

She said the woman, who is known as AB to protect her identity, had been subjected to type 3 female genital mutilation aged six in Somalia.

Around 130 million women, according to the World Health Organisation, have undergone FGM, and the Crown said the practice could be dangerous and could cause haemorrhaging, shock, infection, ulceration and death.

Bex said she was not alleging Dharmasena’s actions exposed AB to the risk of any such side effects. “But a woman’s labia should not be sewn together at all unless medically necessary,” she said. The woman refused to provide a witness statement to the police, the court heard.

Pregnant with her first child, the woman had been seen in antenatal appointments by midwives at the hospital, the jury was told. When asked standard questions about whether she had been subjected to FGM, she told the midwife, “It’s fine, it’s opened”, referring to a revision of her circumcision which had taken place in February 2011.

The midwife should have organised a birth plan for her which would have involved deinfibulation – reopening the vaginal opening – well in advance of going into labour. This was not done. Instead, AB arrived in labour at 8.55am, where her FGM was discovered.

Dharmasena arrived in the delivery room at 10.10am and saw the woman was progressing fast. Concerned about the baby, he made two cuts to facilitate the birth, one of which involved cutting through the scar tissue from the FGM.

In half an hour he delivered the baby. A senior house officer stitched up the mother, but at the insistence of Mohamed, Dharmasena followed up by sewing up the labia with a single continuous stitch around 1.5cm to 2cm long, the Crown said.

When she saw his stitch, the midwife, Aimma Ali, said it was illegal and spoke privately to Dharmasena. He consulted the on-call consultant, Vibha Ruparelia, and explained that he did not know the stitch was illegal.

The consultant said it would be too painful and humiliating to remove the stitch, and it was left in. In his notes, Dharmasena wrote: “Had discussion with consultant post delivery. In hindsight should not have closed stitches. Decision made not to reopen sutures.”

The doctor’s actions were against hospital policy which is written and available and Dharmasena was expected to be aware of it, said Bex.

“The ... published policy is that the cut edges should not be stitched back together and that they should be over-sewn with absorbable stitches so that they heal apart,” she said.

In a statement as part of an internal hospital investigation, Dharmasena said: “I was not entirely sure how to repair the anterior midline incision. The cut edges were very small containing scar tissue and had minimal bleeding.”

When he was arrested in August 2013, however, the prosecution say he changed tack, raising for the first time the defence that the stitch was medically justified, writing: “A single suture was appropriate … in an FGM case where there is bleeding.”

Mohamed is also charged alternately with intentionally encouraging or assisting the commission of an offence contrary to section 44(1) of the Serious Crime Act 2007.

The case continues.