The Frenchman had built up a lead of more than a minute over everyone but team-mate Jari-Matti Latvala heading into the final four stages, but a technical problem - subsequently diagnosed as a slipping clutch – meant he surrendered huge chunks of time on stage 12.
With no service to separate that SS12 and the following 52-kilometre stage 13, and with Mikko Hirvonen rapidly closing, Ogier's lead looked increasingly precarious.
An emergency fix ultimately stemmed the damage, with Ogier going on to win the final power stage and seal a third straight victory.
"This was the roughest Portugal I ever drove for the car; we had quite a lot of problems on the car, but the team managed to fix them all," Ogier said.
"At the start of the first stage [on Sunday] the clutch started to spin, and really I was thinking that it was over for me.
"I thought the rally was lost. I was driving only in front-wheel drive and I was sure it would not be possible to finish like this. At that moment I was sure it was over.
"I was surprised it came back to normal. I came back on normal speed and stayed in the lead, but it was a big moment."
Ogier said he had initially scaled back his ambitions for the point-scoring power stage due to reliability concerns, but found he was able to push once the final run through Almodovar had started.
"Really, it was not my plan [to push] and it really was not the game - I wanted to finish the rally," he said.
"On the last loop we changed the suspension and it was a better feeling again, so without pushing too much I was on the pace.
"I decided to carry on like this. When you can get the points, it's better to do it because you never know what's coming in the future."
- Sports & Recreation