Presented with a rare chance to get a used laptop computer for $50, a crowd of more than 5,000 showed up hours early yesterday at the Richmond International Raceway and -- when the gates finally were flung open at 7 a.m. -- turned into an unruly stampede, as people pushed, shoved and beat each other to get to the Apple iBooks. Elderly men and women were trampled and a girl's stroller was crushed.

"There was pandemonium at the gate where people rushed to get through," said H.W. Stanley Jr., police chief for Henrico County, where the event was held.

The melee lasted about five minutes, and about 70 police officers eventually were called in to control the crowd, Stanley said. About 17 people were injured, including four who were taken to a hospital and treated for scrapes, bruises, heat-related problems and possible broken bones, authorities said.

Four years ago, Henrico County purchased 18,000 of the computers for about $1,100 each for its public school students and teachers. The county decided to sponsor yesterday's event to sell 1,000 surplus iBooks to residents.

The county posted the event on its Web site, local newspapers ran stories on the sale and news otherwise spread on blogs and by word of mouth. But no one expected such a crowd, Stanley said.

"I just think the whole system was overwhelmed with the number of people that showed up," he said.

People began lining up as early as 1:30 a.m., and the traffic to the sale caused a five-mile backup on streets leading to the raceway. Some people parked a mile away and walked to the gates for the chance to purchase one computer each.

When the gates opened, Stanley said, one "aggressive group of individuals" rushed through.

"They decided that they were going to get through first," Stanley said, "and it caused a lot of people to run. When they started to push and run, then the crowd just started to move with them."

Latoya Jones, 19, said, "I could not move, I could not breathe." She said she lost a flip-flop in the ordeal and limped around on the sizzling blacktop with one foot bare. "This is total, total chaos," she said.

About 20 police officers were patrolling the event at the outset, and about 50 others were called in, along with teams of volunteer firefighters who handed out water to the trampled and bruised and otherwise helped restore order, Stanley said.

Eventually, county officials let groups of 100 to 150 people into the building. Once they got inside, people were "very nice, very appreciative," said Paul Proto, director of general services for the county.

"Outside, it really took on a life of its own," he said. "The surprising thing was the attitude and the aggressiveness. It was pretty rough."

The sale ended by 1 p.m., and many people left empty-handed. Some who bought laptops sold them to others for more than $50, Stanley said.

Proto said the county initially was going to open the sale to the general public. When Henrico began receiving inquiries as far away as California and Germany, however, it decided to restrict the sale to county residents, he said.

The county has about 8,000 additional laptops that it plans to sell, Proto said.

Staff writer Michael D. Shear and the Associated Press contributed to this report.

Henrico County Police Sgt. A.J. Scott tries to hold back crowd members pushing against doors at the Richmond International Raceway complex.Crystal Blair, bottom, screams after being knocked down by people rushing through a gate at a computer sale.