BEIJING — The Beijing government put in place emergency measures on Wednesday to try to combat thick smog that has encased the city, which the Communist Party has hailed as a showcase capital, in brown and gray soot. The measures include temporarily shutting down more than 100 factories and ordering one-third of government vehicles off the streets, according to official news reports.

The effort came on the second straight day of air that was rated “hazardous” by the standards of the United States Environmental Protection Agency. That rating, in which the air quality index surpasses 300, means people should not venture outdoors at all. This month, Beijing has faced the most polluted air days on recent record. The surge in pollution, which is happening across northern China, has angered residents and led the state news media to report more openly on air quality problems.

Officials have also begun acknowledging the severity of the problem. Xinhua, the state news agency, reported that Wang Anshun, the newly appointed mayor of Beijing, said Monday that the government had come up with a preliminary plan to curb the pollution.

“I hope we can have blue skies, clean water, less traffic and a more balanced education system,” Mr. Wang said at a session of the municipal legislature, in a broad reference to quality-of-life issues.