A prominent social media entrepreneur was arraigned for first-degree murder Tuesday, accused of gunning down his ex-wife’s new husband, while the victim is being credited with a final act of heroism to protect his family.

Tech mogul Minh Nguyen is accused of killing Corey Mattison. Mattison, a former minor league pitcher with the St. Louis Cardinals organization, was married to Denise Mattison for nearly six months before he was fatally shot.

According to police, Nguyen broke into the Mattison’s Virginia home Thursday and fired shots at Mattison -- but Mattison wasn’t alone. Two children were in the home, Loudoun County Sheriff Mike Chapman said.

Mattison ran for the door, leading Nguyen away from the children, police said. Denise Mattison said her 14-year-old daughter, Madison, and a younger sibling were able to hide in the bathroom and call 911.

“He was my knight in shining armor,” Denise Mattison said.

Nguyen is a tech millionaire, best known for co-founding the online address book Plaxo with Napster and Facebook billionaire Sean Parker. Nguyen was married to Denise Mattison for 10 years before they divorced. She told police that Nguyen was angry recently about his two children spending time with their new stepfather.

Authorities are still investigating the causes of the shooting, they said.

Denise Mattison said her thoughts lie with her husband and his final act.

“He literally laid his life down to save me, and there’s not a question of that,” she said.