McIlroy's putting let him down again on the 13th, a five foot par miss this time - and it cost him top spot as Singh birdied the 11th from the same distance.
Woods also made four there and at one under was five back.
Things continued to see-saw, but suddenly McIlroy went from one behind to three clear of the field.
He holed from ten feet at the 15th and two-putted the long 16th for another birdie, whereas Singh bogeyed the 12th and 14th after missing the green both times.
He fell into a tie for second with Pettersson and also South African Trevor Immelman, while Woods made another birdie from 12 feet at the 13th and had climbed back to joint eighth on two under.
McDowell made it a hat-trick of birdies from the 14th and by getting up and down from sand on the short 17th was tied for fifth on three under.
Pettersson two-putted the 16th to cut McIlroy's lead back to two and the Northern Irishman did well to keep it that way, getting up and down from sand at the 223-yard 17th.
Singh went from bad to worse, double-bogeying the 15th, and although Woods parred the hole he had his problems there too - with a cactus after carving his drive.
The thorns stuck in his trousers and shoes and he was limping badly at first before removing what he could with the aid of a towel.
McDowell was in trouble on the last. In sand for two well short of the green, he could not find the putting surface and by failing to get up and down double-bogeyed for a 71 that left him six adrift and joint tenth.