A Coast Guard who shot dead a female fellow officer and severely wounded her wife had become obsessed with his lesbian colleague, friends claim.

Adrian Loya, 31, traveled from Virgina before shooting dead Lisa Trubnikova and hospitalizing Anna Trubnikova when he opened fire at their Cape Cod condo on Thursday morning, police said.

He then lit a car on fire, planted fake bombs and shot and wounded a police officer, according to law enforcement.

When police told relatives of the incident, their immediate reaction was that Loya had been 'fixated' on Lisa since working with the couple in Alaska.

SCROLL DOWN FOR VIDEO

Tragic: Lisa Trubnikova, 31, (left) has died and her wife Anna, 30, (right) is severely wounded after their former colleague Adrian Loya allegedly shot them in their Cape Cod home. He was 'obsessed' with Lisa, family say

In love: The Trubnikovas both worked in Bourne, Massachusetts, after marrying in 2013 in New York

Ambush: Massachusetts police say Adrian Loya, 31 (center), traveled from Virigina to shoot his two former colleagues at their condo in Bourne, before opening fire during a police ambush, hitting one officer

'He became obsessed,' a family member told the Boston Globe. 'He was fixated on her.'

Lisa and Anna, who married two years ago in New York, were stationed at different bases in Bourne, Massachusetts, and worked together with Loya in Alaska several years ago, family told the Globe.

Lisa was a Coast Guard Petty Officer 2nd Class of Coast Guard Base Cape Cod, and Anna is a Coast Guard Petty Officer 3rd Class of Coast Guard Sector Southeastern New England.

Anna and the third victim, Bourne Police Officer Jared MacDonald, who was wounded responding to the attack, remain in hospital.

According to Cape and Islands District Attorney Michael O'Keefe, the attack appeared to be calculated.

Loya checked into a hotel near the couple's residence two days before the shooting.

'I think there was a significant amount of planning involved,' O'Keefe said.

'He wasn't crazy,' said Lisa older brother Luis Berlanga. 'He knew what he was doing.'

Apprehended: Coast Guardsman Adrian Loya ,of Chesapeake, Va, (right) stands in the glass enclosed defendant's area in District Court on Thursday, February 5, 2015, in Falmouth, Massachusetts, during an arraignment on charges he killed one woman, injured another and shot a police officer in Bourne before dawn

The incident began about 2.15am amid reports of a vehicle on fire, but it quickly escalated into a 'crazy and hectic' scene, Bourne police Chief Dennis Woodside said.

Police say Loya set fire to the vehicle to block the only road into the condo complex, and that he also set up devices resembling bombs, authorities said.

Officers made their way around the burning vehicle on foot but were pinned down by gunfire, O'Keefe said.

One officer was shot in the back below his bulletproof vest during the ambush.

He took cover between two vehicles, but his fellow officers were unable to reach him.

Woodside described the officer as a veteran with at least 10 years of service.

After a half-hour standoff, Loya finally gave himself in to police and was arrested about 2.45am.

Even then, police remained wary, because they were not aware if there were other gunmen.

Inside the complex, the surviving female victim had called 911.

Police entered the condo and found the other victim dead.

The state police bomb squad examined the devices and determined they were all fakes that contained no explosives, Massachusetts State Police spokesman David Procopio said.

Scene: A burned car that Loya allegedly used as a distraction is towed from the scene on Thursday morning

'Crazy and hectic': Police vehicles line a road leading to a Cape Cod condo community about 2.15am Thursday

According to CBS Boston, Loya drove from his base in Chesapeake, Virginia, to Bourne on Tuesday and checked into a local hotel.

He then left the hotel about 2am Thursday and drove to the Cape Cod complex, where he burst into the victims' condo and started shooting.

He was armed with two rifles and a handgun, CBS reported.

Loya reportedly had a previous relationship with one of the victims.

Loya pleaded not guilty to charges including murder, armed assault, home invasion and assault and battery of a police officer on Thursday afternoon during an arraignment in Falmouth District Court.

A judge ordered Loya to be held without bail and to undergo a mental health examination, and also ordered the file sealed.

Cape and Islands District Attorney Michael O'Keefe and Loya's attorney, J. Drew Segadelli, didn't discuss details of the case during the court hearing.

Afterward, Segadelli said Loya and the two women had some type of relationship but said he couldn't comment further because the file was sealed.

Behind bars: Adrian Loya pleaded not guilty to charges including murder, armed assault, home invasion and assault and battery of a police officer on Thursday afternoon during an arraignment in Falmouth District Court

Investigation: Police said the bomb squad responded to examine items suspected of being hoax devices found there, allegedly placed by the shooting suspect, who was taken into custody

The wounded officer was carried through the woods and snow by colleagues so he could be taken to the hospital, where he was stabilized and improving, the chief said.

Residents were at first told to stay inside their units, but Woodside later said the area was safe.

He did not disclose any other details or a motive, and it was unclear when the suspect would be arraigned.

The Coast Guard was helping in the investigation.

'Today the Coast Guard family suffered a tragic loss,' Coast Guard Rear Adm. Linda Fagan said in a statement.

'We have chaplains and counselors on site to support friends and families affected by this crime.