The M-Sport Ford driver had edged 3.9s clear of the field after stage two, Ourique, and was then among the fastest drivers through the first three splits of stage three.
Thirteen kilometres in, however, he rolled his Fiesta after pushing too hard through a left-hander.
M-Sport confirmed that both Ostberg and co-driver Jonas Andersson were unhurt in the accident, but will not restart today.
As a result of the crash Sebastien Ogier now leads, 4.4 seconds ahead of stage three winner Dani Sordo. Ogier's VW stablemate Jari-Matti Latvala is third, 11.5s down the road.
"Mads was so fast, some stages it was not possible to follow him," Ogier said. "It's not a relief though, as Jari and Dani are not far."