A policeman repeatedly punched his pregnant ex-girlfriend in the stomach because he did not want her to have his baby, a court has heard.
Matthew Cherry, 35, allegedly barged his way into Caroline Craft's flat in Bournemouth in March last year when she was six months' pregnant.
It is claimed he wore a balaclava and hooded top while carrying out the assault in an attempt to force Miss Craft to miscarry.
Winchester Crown Court heard the couple had split up after Miss Craft, 27, decided she did not want a termination and was going to keep the baby.
Cherry, at the time an officer with Dorset Police, was angry, aggressive and desperate for her to have an abortion, the court was told.
He is also alleged to have told Miss Craft, a fellow police officer, that he had thought about punching her in the stomach so she would lose her baby.
Cherry, from Parkstone in Poole, Dorset, denies attempting to cause grievous bodily harm with intent and says he was not the attacker.
Prosecutor Matthew Jewell said Miss Craft was in her ground-floor flat waiting for an estate agent to call when she was attacked on March 24 last year.
Cherry allegedly entered the block by buzzing an intercom of another flat and saying "police" and then pretending to be a cleaner using a vacuum cleaner.
It was described in court as a planned attack by someone "forensically aware".
"Caroline Craft then heard a knock on the door of her flat. She opened the door, which was then pushed violently from outside and she was either pushed or punched to the floor," Mr Jewell said.
"She was then attacked with multiple punches to her stomach and back, in a way which targeted her unborn child. She shouted for help and a gloved hand was placed over her mouth.
"She was also kicked. She pointed out valuable items in case this was a robbery or burglary but her attacker showed no interest in taking anything.
"She was dragged into the bathroom and forced to sit on the toilet. The male said he would tie her up. She was absolutely terrified about what was happening to her in her own home."
The attacker was interrupted when the estate agent arrived and fled using a back door - indicating he knew the layout of the building.
Ms Croft was taken to hospital and later gave birth to a baby boy.
The court was told that Cherry had previously owned the flat and sold it to Miss Craft, who he first met in May 2010.
Shoe impressions found at the scene were discovered to have been left by size 10 Nike Dart trainers.
A box which originally held a pair of the trainers was found at Cherry's home when it was searched, the court was told.
The trial continues.