The shooting spree began in a home in Dallas and ended soon afterward in another house in DeSoto, a suburb about 15 miles south, said Corporal Melissa Franks of the DeSoto, Texas Police Department.
The suspected gunman, Erbie Bowser, was taken into custody, Franks said.
The two people killed in Dallas were Tasmia Allen, 17, and her mother, Toya Smith, 43. Smith was identified by her mother, Lurlean Smith, as Bowser's girlfriend. "He's controlling," Smith told local television. "He controlled my daughter."
Police did not identify the DeSoto victims, but Verniece Criddell, 79, a relative, said they were Zina Bowser, a nurse and the estranged wife of Erbie Bowser, and her daughter Neima Williams. The two boys, ages 11 and 13, who were wounded in DeSoto were Zina Bowser's sons.
A 17-year-old girl and a 14-year-old boy were wounded in Dallas.
Family members said that none of the wounded children were related to Bowser.
Bowser was a well-liked special education teacher in Mesquite, Texas who resigned in 2010, said Laura Jobe, a spokeswoman for the Mesquite Independent School District.
"He had a good history here," she said. "He's been described as a gentle giant."
Police said the first emergency call came late on Wednesday evening from a woman who became concerned after speaking by phone with someone at the Dallas home. She drove to the house but no one answered.
Another emergency call was received from the DeSoto residence.
"We do believe this is a domestic-related incident," a police official said.
All of those killed were believed to have died from gunshot wounds, although Franks said an explosive device was used as well.
A U.S. Army spokesman said a man named Erbie Bowser served from 1991 to 2000, reaching the rank of sergeant and receiving several medals, including one for good conduct, and an "Expert Infantryman" badge.
A spokesman for the Dallas Mavericks professional basketball team confirmed that Bowser had been a member of the group's dance team, the Mavs ManiAACs and left the squad in 2009. LINK
(Reporting by Tom Brown and Mary Wisniewski; Writing by Greg McCune; Editing by Ellen Wulfhorst)