crime scene
This is a representational image of a crime-scene tape in Chicago, Illinois, in March 2005. Getty Images/Scott Olson

A father shot and killed his wife and three children at her San Diego home after she obtained a restraining order against him. A fourth child was shot too but is still in a critical condition after undergoing emergency surgery.

After shooting his family the father committed suicide, San Diego Police Lt. Matt Dobbs said at a press conference Saturday.

The police got a 911 call on Saturday where they could hear arguments in the background. While on their way to the Paradise Hill neighborhood where the family lived, they received a second 911 call, this time from a relative next door, who apparently heard a nail gun firing.

When the officers reached home, they saw all six members of the family bleeding from gunshot wounds. 31-year-old father José Valdivia, his wife Sabrina Rosario, 29, and their youngest son Enzie Valdivia, 3, were declared dead on the scene.

The other sons were taken to the hospital. However, two of them, Zuriel Valdivia, 5, and Zeth Valdivia, 11 succumbed to their injuries, NBC San Diego reported. Ezekiel Valdivia, 9, underwent surgery and is critical.

According to police, Rosario and Valdivia, who had met in high school, were in the process of getting a divorce. She had obtained a restraining order against him on Friday, Nov. 15. However, according to Rosario’s family members, Valdivia didn't want a divorce.

Valdivia stalked and threatened his wife sending her photos of alcohol and gun, saying he had suicidal thoughts. Rosario had accused him of abuse while they were still together but felt she had nowhere to go, according to neighbors and family members. They often heard sounds of arguing coming from their home.

A couple of weeks ago, police had responded to a “disturbance over property” at Rosario’s home, after Valdivia showed up asking for tools. It is then when she gathered information about how to file a restraining order.

"All of San Diego mourns for the family and the surrounding neighborhood. This senseless act of violence goes against everything our community stands for and we will get through this together," San Diego Mayor Kevin Faulconer tweeted.