Thousands of runners have taken part in the 34th Beijing International Marathon, many wearing face masks amid concerns about pollution.
The organisers warned runners to expect slight or moderate smog, but the US embassy in Beijing said air quality early on Sunday was "hazardous".
One resident in the city told the BBC that the air smelt like burnt coal.
Estimates said that pollution soared above the maximum recommended World Health Organization levels.
The WHO says daily pollution levels should not exceed an average of 25 micrograms per cubic metre of fine particulate matter.
Yet the US embassy's monitor at one point reported peaks of up to 400 micrograms per cubic metre, which it said would be hazardous if a human was exposed to it over a 24-hour period.
Fine particulate matter, the kind of pollution in smoke, damages the body as it moves deep into the lungs and can even enter the bloodstream.
'Should have been cancelled'
Some athletes gave up the race because of the pollution.
British runner Chas Pope tweeted that he was only able to do 10km (6 miles) of the race in a mask before he was forced to pull out.
He said that race should have been cancelled because the air quality was "not suitable for outdoor activities".
China's Gong Lihua, who came third in the women's race, said the smog had caused some difficulties.
"Running in this kind of smog, I felt I couldn't sweat well and my body has been very sticky and moist," she said.
Beijing resident Neil Holt told the BBC that although the air quality was better than last year, "it was still very polluted".
"You can hardly see [the stadium] through the smog. It's really hard to breathe when it is like this," he said.
The men's race was won by Ethiopian runner Girmay Birhanu Gebru and another Ethiopian, Fatuma Sado Dergo, won the women's race.