By Mike Hellgren

BALTIMORE (WJZ) — The mistress of an Army sergeant took the witness stand for the prosecution, as he stands trial in the murder of his wife.

The killing happened in 2015 in Anne Arundel County. Fort Meade Pfc. Karlyn Ramirez was found dead in her townhouse in Severn with her unharmed infant daughter in her arms.

READ MORE: Maryland Weather: Muggy With A Chance For Showers & Storms

An investigation zeroed in on her husband, Maliek Kearney, a decorated sergeant she met while stationed in Korea.

Prosecutors allege — as their marriage crumbled — Kearney traveled from Fort Jackson in South Carolina where he was stationed, to his wife’s home in Severn. They say he shot her three times at close range. She had an active protective order against him at the time.

On Wednesday, Kearney’s longtime friend and lover Dolores Delgado testified about the plot.

“He said he was planning to kill his wife if she didn’t reconcile with him,” Delgado told jurors.

She said Kearney instructed her to buy gas cans so he would avoid being detected at a gas station, and he asked to use her car for the trip.

She said he also used her gun.

Prosecutors say Kearney worked his Monday shift at Fort Jackson and drove to Maryland and back — making it to work as scheduled the next day.

They allege he was using his presence at work as an alibi in the elaborate cover-up.

Kearney’s defense attorneys contend the timing makes their client’s involvement impossible.

Delgado described on the witness stand how Kearney avoided detection by using back roads and left his cell phone with her so he couldn’t be tracked as she waited at his apartment in South Carolina.

READ MORE: Orioles Outlast Rangers 10-9 On Mullins' 10th Inning Double

She said she was wracked with guilt because she failed to warn Ramirez.

She recalled Kearney telling her, if his wife’s roommate happened to be home, “he would kill both of them and make it look like a sexual assault.”

After the killing, Delgado says Kearney, “couldn’t believe that he just left her lying there. He said that he wanted to shoot himself after he did it.”

“He told me what he did, and he asked me why I didn’t stop him,” Delgado testified.

Delgado also recounted how she met Kearney while they were both serving in Iraq in 2007 and they had an on-again-off-again sexual relationship.

She has reached a plea deal with the government regarding her involvement in the crime that spares her the death penalty.

Kearney maintains his innocence and his lawyers plan a vigorous defense.

Kearney and Ramirez’s infant daughter is being raised by her family.

Delgado said being in the military, Kearney knew her superior officer would check on her if she didn’t show up for work, so he killed her on a weekday.

“He didn’t want his daughter left alone or hurt,” she testified.

MORE NEWS: Bowie Picks Up The Pieces After Possible Tornado Leaves Trail Of Damage

Follow @WJZ on Twitter and like WJZ-TV | CBS Baltimore on Facebook