Outside the small restaurant where he was having dinner, Huang Qi saw men he recognized, plainclothes police officers. He got on his cellphone to alert colleagues: Something might happen tonight, he said. We were followed.

Huang, who had already served a five-year prison term for political material posted on his Web site, had just published an article about China’s latest forbidden topic: shoddy construction of school buildings in Sichuan province, where more than 9,000 children were killed when their classrooms collapsed in the May 12 earthquake.

As Huang predicted, when he and two friends walked out of that restaurant in Chengdu on June 10, the police closed in. He is being held in a detention house in the city, the capital of Sichuan province, charged with illegal possession of state secrets, a catchall term often used to stifle dissent.

Huang, 45, is among dozens of Chinese writers and lawyers who have been convicted, detained, placed under house arrest, tailed or otherwise harassed as part of China’s broad crackdown on dissent in the run-up to the Olympic Games in Beijing next month. At least 44 writers are in Chinese prisons in violation of their rights to free expression, more than at the beginning of the year, according to a report released Tuesday by the PEN American Center, an advocacy group.

While much has been written about the political stakes involved, less well known is the personal toll that opposing the official Chinese government line these days can take. Huang’s friends are often harassed and sometimes detained; his wife, Zeng Li, has been forced to change apartments frequently after police pressed landlords to evict her; frequent beatings when he was in prison left Huang with brain injuries that now spark bouts of violent anger and other health problems. The stress eventually became too much for Zeng; she separated from Huang in 2006.

She remained in touch with him, however. Before his arrest last month, “I begged him not to post anything sensitive, not to oppose the government,” Zeng said in an interview this week. “Huang’s personality is always to hold out until the end. He feels his conscience needs to speak for those who have grievances.”

His life did not have to be one of hardship. The communications engineer was just 36 and a successful businessman in Chengdu when he stepped off the path taken by China’s budding capitalist elite.

In 1999, he established a Web site that publicized the grievances of the poor in Sichuan province, where he lived with Zeng and their son. Conceived as an online site where families would share information about missing relatives, it quickly became a place to read about common people attempting to defend their rights: seven local girls who were sold into prostitution; thousands of area farmers sent overseas to work and then refused pay; a mother fighting for compensation for a son whose death was linked to the suppression in 1989 of democracy protests on Beijing’s Tiananmen Square.

Shortly after that last article was published in 2000 — Tiananmen, like the Sichuan school collapses, is a forbidden subject in China — Huang was arrested and convicted of “subverting state sovereignty.”

Although he was recently quoted as saying the human rights situation in China is better now than 10 years ago, on June 10 he again became an example of what happens to activists and their friends when someone crosses the government.

“Run!” Huang yelled to his two friends as he was knocked to the ground outside the restaurant and surrounded by plainclothes officers. They dragged him to a waiting car and drove off — the last time anyone outside China’s security apparatus has seen the Web journalist.

Huang’s companions, Pu Fei, a volunteer worker on Huang’s Internet site, and former teacher Zuo Xiaohuan, tried to get away but did not make it far. Zuo was bundled into another car. His whereabouts are unknown.

Pu hopped into a taxi, he recalled in a telephone interview, but it was quickly blocked by three unmarked police cars. Officials pulled Pu out and stuffed him into a vehicle. His watch and cellphone were smashed in the scuffle.

“I remember thinking this might happen, since at dinner Huang Qi realized we were followed,” Pu said. “But I was still very, very angry. What they did was totally beyond all reason, very inhumane and uncivilized.”

In the car, “they used their feet to press my head down between the front and back seats,” Pu said, so he could not see where he was being taken.

After three days in a detention chamber, Pu was moved to what looked to be a hotel room at a resort, he said, with a single bed and an attached bath. At least two guards were in the room with him at all times.

He was allowed to shower and sleep, but his food was limited — only two steamed buns a day, with water. The guards prevented Pu from looking out the window.

He was told to read the Communist Party-run newspaper, People’s Daily, and forced to watch an endless loop of propaganda video showing people the government considers heroes rescuing earthquake victims. Pu had recently traveled with Huang to the quake zone, distributing water and other essentials to victims and talking with parents whose children had died in collapsing schools.

Pu’s captors read, played games and listened to music, he said; he was stuck watching the video. They told him it was a “law study seminar” intended to correct his misconceptions about the law, Pu said.

Various interrogators came and went, asking the same questions over and over: “How did you meet Huang Qi?” “Who did you meet in the earthquake areas?” “Were you in contact with any overseas people?”

“Mostly I didn’t answer,” Pu said.

After 12 days, he was shoved back in a car, his head again held down between the seats. He was driven for two or three hours before being pushed out of the car at a sports stadium in Chengdu. His captors warned him not to talk about what had happened.

Fuming, Pu walked to his office at a computer company. There, he was told he had been fired. Police had confiscated his computer and hard drive.

“I wasn’t afraid, because I have faith in democracy and freedom,” Pu said. “When Mr. Huang is out, I might still work with him.”

But no one expects that to happen soon. Although Huang’s wife, mother and attorney have tried to see him, the Chengdu Public Security Bureau has denied their requests. The bureau referred a call for comment to the local propaganda ministry, where an official, Jia Xiaobing, said he had no information about Huang’s case.

Under the state secrets provision of Chinese law, Huang can be held incommunicado for more than six months, said Mo Shaoping, Huang’s attorney.

Human rights advocates say Huang is on a U.S. short list of “priority cases,” meaning his detention is specifically raised by U.S. officials when they meet Chinese counterparts to discuss human rights.

As the Olympics draw near, Chinese security officials appear to be targeting people who could channel information about rights abuses and government corruption to foreigners by publishing, as Huang’s Web site does, in Chinese and English. The site, http://www.64tianwang.com, is hosted on a server in the United States and is blocked in China by government censors.

“The government has locked itself into a fictional account that the Chinese population has no interest in human rights and no criticism against the preparation of the Olympic Games,” said Nicholas Bequelin, a Hong Kong-based researcher for Human Rights Watch. “Since that’s not the reality and thousands are involved in human rights activities, they have to silence quite a few people.”

Bequelin added, “They’ve been very systematic, very effective.”