A source close to the supermarket giant said PHD eventually triumphed because it submitted new pricing that was "extremely competitive" and undercut rival M/SIX.
The result is a coup for PHD and its parent company, Omnicom Media Group, which had faced losing the £62m Sainsbury’s account after 22 years.
Sainsbury’s decided in February to award its expanded £115m account, which included the £53m Argos business, to M/SIX, following a secret, closed review that began last autumn.
However, OMG and PHD immediately challenged the way Sainsbury’s ran the process and successfully demanded that the FTSE-100 retailer should reopen the review in a highly unusual move.
Sainsbury’s prides itself on treating its suppliers fairly and, in a sign of how it took OMG’s complaint seriously, the retailer’s board of directors oversaw the re-run of the review process between February and June.
It is understood that PHD used the opportunity to cut the prices it had initially offered Sainsbury’s.
Campaign first reported at the end of June that Sainsbury’s was poised to overturn its original decision and hand the account to PHD in a sensational U-turn, but it has taken another month for the negotiations to be finalised.
A Sainsbury’s spokesman said: "We can confirm PHD has been awarded the contract."
The spokesman declined to comment on how the review was conducted or to discuss the nature of OMG’s complaint about the process.
A source praised PHD and M/SIX, saying both agencies had delivered creative, impressive pitches, but pricing had ultimately proved decisive.
OMG and M/SIX, a joint venture between The & Partnership and WPP, both declined to comment.
WPP’s Mindshare holds the Argos account but did not take part in the review because it already looks after Marks & Spencer, a rival to Sainsbury’s.
Mindshare is due to hand over the Argos business to PHD at the end of September following a transition period.
Sainsbury’s bought Home Retail Group, the parent company of Argos, last year as it seeks to become what it calls a "multi-channel food, general merchandise, clothing and financial services retailer" that can respond to the rise of Amazon.
The FTSE-100 group has promised shareholders it will make £500m efficiency savings over three years across the business.
The & Partnership remains close to Sainsbury's as CHI & Partners, M/SIX's sister agency, handles creative duties for Argos.