Next, an uncontrolled effort from Lacko gave a 4-3 advantage to the 36-year-old Swiss.
After serving out for the first set, Federer didn't drop a single point on his serve in the second and kept that streak going until he was 30-0 up at 4-1 in the third - when Lacko finally sent a backhand victor down the line. Making her 21st Wimbledon appearance, 38-year-old Venus is the oldest woman in this year's tournament.
With flying ants stuck in Wozniacki´s hair and dive-bombing her throughout the match, the former world number one asked the umpire if there was something that could be sprayed to keep the bugs away. "I'm happy to be through, I think I played much better today". Caroline Wozniacki, the Australian Open Champion became the biggest name to exit the championship after falling 6-4 1-6 7-5 to Russian world number 35 Ekaterina Makarova.
Coverage: Watch live on BBC TV, BBC iPlayer, BBC Red Button, Connected TVs and the BBC Sport website and app; Live Radio 5 live and 5 live sports extra commentary; text commentary online.
Wimbledon 2018: Keys admits to being distracted by Serena clash
The American won 6-3 6-3 6-4 on Court Three, serving 21 aces, to set up a last-16 meeting with Stefanos Tsitsipas . Struggling to stay in the set after half an hour, Williams found her huge serve just in time to hang on for 4-5.
In the third set, Federer broke Lacko in the fifth game to take a commanding 4-1 lead before winning the final two games to finish off the match. Novak, ranked 171, converted six out of 11 break points en route to victory in almost three hours.
Elsewhere, American world No.13 Sam Querrey eliminated Sergiy Stakhovsky of Ukraine 7-6 (7-4) 6-3 6-3 while Russia's Daniil Medvedev, earned a straight-set victory over world Guillermo Garcia-Lopez of Spain 6-3 6-4 6-2.
"I haven't played her in a while".
Federer said that he hoped to get his famous "RF" logo back from Nike "sooner than later".
Germany eliminated with shocking loss to South Korea
The normally rock solid Neuer spilled a free kick in the first half but his counterpart, Jo Hyeon-woo, didn't put a foot wrong. But this is the third straight World Cup in which the previous champion has been knocked out before the end rounds.
Seven-time champion Serena Williams faced little resistance in her progress to the third round as she overpowered Bulgarian qualifier Viktoriya Tomova 6-1, 6-4.
American Keys kicked off her Fourth of July celebrations with a 6-4 6-3 victory over Thailand's Luksika Kumkhum.
"Yeah, I'm very happy on both ends, absolutely", Federer said.
Novak will next face 2016 Wimbledon runner-up Milos Raonic, who hit 34 aces in his 7-6 (4), 7-6 (4), 7-6 (4) victory over John Millman. The eight-time champion Roger Federer shared a video where he said: '[The] first day at Wimbledon, just walking past court 18, still my favourite match [John] Isner against [Nicolas] Mahut, I still wish it was going on.
Watch tonight's World Cup clash for free
Following the much changed sides from both England and Belgium , fans were quick to make links of the two teams wanting to lose. Topping Group "G" means playing whoever will have finished second in Group H earlier on Thursday - Colombia , Senegal or Japan .
Also in the women's draw, Dulgheru's fellow Romanian, Mihaela Buzarnescu, cruised through to round three with a 6-0, 6-3 rout of 19-year-old Briton Katie Swan.