BEIJING — A crowd of 30,000 people, baking in the heat and waiting for up to two days, swarmed a ticketing center Friday as the final batch of Olympic tickets went on sale. Police shoved and kicked them and used metal barricades to prevent a stampede.

The Aug. 8-24 Beijing Games are the first Olympics expected to be sold out, and some fans spent the night on thin bamboo mats and newspapers for a chance to buy the 250,000 tickets that went on sale in different parts of the city.

At the main ticket office not far from the national stadium known as the Bird's Nest, tempers flared as sticky bodies pressed against each other in the surging crowd before sales began at 9 a.m. Police yanked more than half a dozen unruly fans from the crowd, kicking one who fell as he was being led away and dragging another by his hair.

"It was very dangerous. I was afraid," said Wang Zhenqiang, who waited 28 hours with Ji Liqiang, a fellow businessman from eastern Shandong province, to buy tickets to the diving competition.

Hundreds of police and paramilitary troops tried to control the crowd, with lines of officers throwing their weight into hastily erected metal barricades to hold back the throng. There was no line; fans were allowed to pass through the police barricade in groups of 25 to 50, streaming toward the two-dozen-plus sales windows.

Scuffles broke out as officials opened additional windows at the last minute, causing some fans to stampede ahead of others.

"People got hurt around me. They fell and injured their knees and elbows. A barricade was bent out of shape by the crowd," Wang said.

In the scramble, Wang and his friend ended up with tickets to synchronized swimming, instead of the diving competition — where China is a gold-medal favorite.

"We all could see there would be a huge problem, and it became very chaotic," Ji said. "This also shows the Chinese government lacks the ability to deal with public crises."

Temperatures topped 93 degrees with 94 percent humidity on Friday, and some of the fans fainted in the heat. Some men stripped off their shirts during the long, muggy wait and police restraining the ticket buyers also handed out bottles of water.

Thousands also waited in western Beijing for 20,000 tickets for basketball. Another 570,000 tickets went on sale for preliminary round soccer matches in the cities of Tianjin, Shanghai, Shenyang and Qinhuangdao. There were no reports of major problems at the other sites.

Zhang Xiaojing, 17, who came from Changzhou in Hebei province with her cousin and three friends, said the line at the main ticket office was fairly orderly when she arrived Thursday afternoon. But in Friday's rush, only three of her friends were able to elbow their way close enough to buy tickets.

"If I'm going to be disappointed, I'm going to be disappointed. But I'm so tired. I didn't sleep last night," she said after spending the night playing poker with friends.

Security officials also scuffled with journalists trying to report on the sometimes-chaotic scene. Some reporters were escorted away after going into off-limits areas, the official Xinhua News Agency said.

Hong Kong television showed several journalists pushing back against police. Hong Kong Cable TV showed a policeman putting his arm around the neck of one of their reporters and pulling him to the ground.

The reporter said he was assaulted after his crew refused to leave a media zone, Cable TV reported. They were seen surrounded by dozens of police.

A spokeswoman for Hong Kong Cable TV said the authorities' behavior was "unacceptable."

"We hope the authorities will live up to their earlier promise to allow full freedom of the press during the Olympic games," said Shum Siu-wah.

Open media coverage of unexpected events away from Olympic venues has been a question for these games. Beijing is on record promising complete freedom to report for foreign journalists, but already broadcasters have had their work interrupted.

An Olympic official defended the police actions, saying they were trying to keep order in the crowd of more than 30,000 people.

"There were many, many people over there and I think the police had to do their job and they had to keep order," said Sun Weide, spokesman for Beijing's Olympic organizing committee. He refused to comment on whether the sales process was poorly planned.

A Beijing police duty officer refused to comment, referring questions to a Xinhua report on the sales. The article said hot weather and the long wait caused some people to become impatient. Police imposed temporary measures, including limiting access to some areas, to maintain order, it said.

The high turnout underscores the demand for Olympics tickets, particularly among Chinese. In November, organizers had to suspend one round of domestic sales after overwhelming demand crashed the ticketing system. Officials switched to a lottery.

The official ticketing provider for the games has said every event in every venue was expected to be sold.

"We predict that this will be the first ... 'sold out' Olympics," Jonathan Krane, the head of Ticketmaster in China, said in May.

Ticket sales for past Olympics varied widely. The 2004 Athens Olympics sold only about two-thirds of 5.3 million tickets available, and there were many empty seats.

The Beijing Games are likely to be played in front of full venues, although tickets that went to sponsors and the national Olympic committees of participating countries may not all get used.

In all, 6.8 million Olympic tickets have been available for domestic and foreign sales.

The most expensive tickets are for the Aug. 8 opening ceremony, which cost $645. Organizers said 58 percent of all tickets would cost $12.90 or less, in line with efforts to make them affordable to average Chinese citizens.

Associated Press Writer Dikky Sinn in Hong Kong contributed to this report.