The suspected shooter, believed to be the estranged father of the children, is among the dead, said San Diego Police Department homicide Lt. Matt Dobbs.
"It appears to be a tragic case of domestic violence-murder suicide," Dobbs said.
One victim, believed to be about 11 years old, survived the violence and was in surgery, he said.
Killed were a 31-year-old man, a 29-year-old woman and three children, ages 3 to 9, Dobbs said. The 3-year-old was found dead at the scene, and the 5-year-old and 9-year-old died at a hospital, he said.
Let our news meet your inbox. The news and stories that matters, delivered weekday mornings.
The suspect was the subject of a restraining order resulting from a contentious divorce, police said.
Officers had responded to a property dispute at the address around Nov. 1 and told the mother, who was killed Saturday, how to obtain a restraining order,said police Chief David Nisleit.
The order went into effect Friday, and the suspect was aware of it, Dobbs said at a news conference.
"We believe the male came over this morning, there was some kind of argument or disagreement, and he used a handgun and shot his family before turning the gun on himself," he said.
Police went to the house in Paradise Hills, a working- and middle-class neighborhood of mostly postwar homes southeast of downtown San Diego, based on a call from the mother, who was in the home, Dobbs said.
He later said no one spoke during the call, but dispatchers could hear arguing and someone being told to leave.
A second caller, a relative who lived next door, called police and said he heard what he thought was the sound of a nail gun going off.
Arriving officers "were able to look through one of the windows and see a small child inside covered in blood," Dobbs said at the press conference.
Police said multiple relatives of the family live in nearby homes. The community, where many U.S. Navy families live, is about 37 percent Latino and 32 percent Asian American, according to U.S. Census data.
Dennis Romero reported from San Diego, Ben Kesslen from New York.
Dennis Romero writes for NBC News and is based in Los Angeles.