Roger Federer and Stanislas Wawrinka's bid to retain their Olympic doubles titles was shattered on Wednesday as the Swiss duo slumped to a shock defeat by Israel's Jonathan Erlich and Andy Ram.

Despite losing the first set, the unfanciied Israelis bounced back to win 1-6, 7-6 (7/5), 6-3 at Wimbledon on Wednesday.

Federer and Wawrinka were the defending champions in the men's Olympic doubles event. Pic/AFP

Federer has described his gold medal victory with Wawrinka in Beijing four years ago as one of the greatest moments of his illustrious career and he was determined to mount a strong defence of the title.

But the seven-time Wimbledon singles champion and his partner, seeded sixth at the Games, were unable to emulate their Chinese triumph as the Israeli pairing fought back on Court 18.

Federer could at least take consolation from reaching the quarter-finals of the Olympic singles, achieved with a victory over Uzbekistan's Denis Istomin earlier on Wednesday.