Saturday's party in Cypress, an unincorporated area about 25 miles northwest of Houston, was promoted openly on several social media sites and drew more than 100 people, most of them 17- to 19-year-olds, Harris County Sheriff Adrian Garcia said.
He said people were apparently dancing in the home at about 11 p.m. when someone fired a pistol in the air in celebration. In the ensuing confusion, someone else began firing into the crowd, causing people to stream into the narrow street, Garcia said.
Partygoer Shaniqua Brown - who said she heard about the party through Instagram, a photo-sharing app and website - told The Associated Press it "was not rowdy at all." She said she first heard gunshots in the house and they continued outside as people fled and sought cover.
After giving varying reports of how many people were injured, authorities clarified Sunday that 20 people were hurt, including 16 who were wounded by gunfire - two critically - and four others who suffered injuries while trying to flee.
The two people killed, one an 18-year-old boy and the other a 16-year-old girl, were students at Cypress Springs High School, Garcia said.
He said investigators were seeking two suspected gunmen - one of whom is believed to be about 17 years old and the other who is thought to be about 22.
Garcia chastised the party organizers, who advertised the event on social media, saying "you have no control on who to expect at your door."
He said the organizers arranged to have people searched as they entered the home. "Anytime you have to factor in a bouncer and being searched at the door, you have already taken a turn for the worse," he said.
"It's a horrible combination of immaturity, access to a firearm, and the inability to control one's self," Garcia said.
Mariah Boulden, who said it was her birthday party, said the bouncer patted people down as they entered the home. Two men refused to be searched and walked away, but they apparently hopped a neighbor's fence and entered through a back gate.
"They weren't supposed to be here, whoever they were," Boulden said.
Pools of blood were visible outside the two-story brick home Sunday, and the garage door was bent after people had pushed it upward while trying to escape.
Sheriff's spokesman Thomas Gilliland said that when deputies first arrived at the home about 25 miles northwest of Houston, they were met by "mass chaos" and "kids were literally everywhere." He said witnesses reported partygoers jumping from the second floor in their scramble to flee.
Bruno Figueroa, who lives a few houses away, told the AP he heard five to 10 shots. He looked out his window and saw at least 30 people running down his street.
"Kids were running everywhere," he said.
Figueroa said people suddenly began ducking into backyards and behind vehicles in driveways, apparently trying to hide from a car that was slowly coming down the street. Figueroa said that from his upstairs window, he could hear the people who were hiding nearby.
"They were crying, yelling, 'My brother got shot,' 'Why did they do this?'" he said.
Figueroa said as soon as the slow-moving car rounded a corner and sped away, the people who had been hiding gathered back in the street.