The city woman who was allegedly raped and beaten in her home by her former boyfriend earlier this month had received an emergency restraining order against him just two days before the alleged attack.

Newton District Court Judge Dyanne Klein extended the order against Constantine Greven for one year yesterday after the Westford man allegedly punched, choked and raped the woman repeatedly between Thursday, Sept. 15 and Friday, Sept. 16.

Greven denies the attack and told Klein he opposes the restraining order.

The alleged victim, who is not being identified by the Tribune, had visible bruises on her face yesterday.

Klein said she also had several bruises the day she came to court to get the emergency restraining order against Greven, who is incarcerated in the Middlesex House of Corrections.