Image copyright CBS Image caption Richard Field (L) and Lina Bolanos (R) were engaged to be married

One of two doctors killed in a luxury Boston penthouse sent a text to a friend saying, "gunman in the house".

A prosecutor disclosed the desperate message during the hospital bedside arraignment of Bampumim Teixeira.

The accused was injured in a shootout with police at the flat where the bodies of anaesthetists Richard Field - a Londoner who sent the text message - and Lina Bolanos were found.

The couple, engaged to be married, were tied up and their throats cut.

The suspect was formally charged on Monday at Tufts Medical Center in Boston where he is being treated for non-life threatening injuries.

He is being held without bail on two counts of murder. His lawyer entered not-guilty pleas for him.

Image copyright Reuters Image caption Bampumim Teixeira, a 30-year-old suspect, is arraigned on two counts of murder and is shown here in his Boston hospital room

Mr Teixeira, 30, was arrested after police exchanged fire with him while responding to reports of an intruder at the high-rise apartment complex in South Boston on Friday night.

Upon arrival, officers found a set of keys on the floor and used them to open the door when no one responded to their shouts, Suffolk Assistant District Attorney John Pappas said during Mr Teixeira's arraignment on Monday.

Mr Teixeira was struck in the hand, abdomen and leg during the shootout with the two officers.

The officers apprehended Mr Teixeira inside the penthouse flat before discovering Dr Field, 49, and Dr Bolanos, 36, who were already dead, the Boston Globe reported.

Image copyright Facebook Image caption Dr Bolanos was born in Colombia while Dr Field was from London, according to his Facebook page

A message of retribution was apparently written on the wall, an official told the newspaper.

It is not clear whether Mr Teixeira knew the victims. A motive is unclear.

He reportedly worked previously as a security employee at the condominium complex.

Mr Pappas declined to say the cause of death, but said both victims had suffered "obvious trauma" and were pronounced dead at the scene.

Dr Field - who is from London, according to his Facebook page - sent two text messages to a friend in a plea for help, Mr Pappas said.

One text said "there was a gunman in the house".

Image copyright Facebook Image caption The couple posted pictures on social media of their travel adventures around the world

The friend called the police, Mr Pappas added.

Police also discovered a black backpack at the scene containing jewellery, which authorities believe belonged to Dr Bolanos.

A motive for the attack is still unclear and Mr Pappas did not say how Mr Teixeira was able to get through tight security to reach the top levels of the residential complex.

Mr Teixeira was recently released from prison after serving nine months for bank robbery.

His next hearing is set for 8 June.

Dr Bolanos was a paediatric anaesthesiologist at Massachusetts Eye and Ear Infirmary.

Dr Field worked at the Brigham and Women's Hospital, an affiliate of Harvard Medical School.

Dr Bolanos had cancelled plans on Friday night to invite a surgeon for dinner because Dr Field was not feeling well, the Boston Globe reports.