Hibernian booked their place in the last 16 of the Betfred Cup as group winners after a hard-fought win at Scottish League Two side Elgin.
Joe Newell opened the scoring for the visitors after 10 minutes and Florian Kamberi doubled their advantage after the break, although both goals were due to defensive mistakes.
The Premiership side flew out of the blocks and Kamberi was inches away with a low strike from distance in the third minute.
They went ahead after an Elgin error let in Daryl Horgan on the right and his low cross was forced home from close range by Newell.
Midway through the half Christian Doidge set up another chance for Kamberi, but his first-time effort was palmed away by goalkeeper Tom McHale.
Kamberi thought he had made it 2-0 six minutes before the break when he bundled in a Doidge header across goal, but the effort was ruled out for offside, although replays showed it should have stood.
Elgin's Rabin Omar forced a good save from Hibs keeper Ofir Marciano with a fierce 20-yard strike after 49 minutes.
Kamberi then fired a good Hibs chance straight at McHale, while Elgin threatened an equaliser when Shane Sutherland's through-ball threatened to play in Kane Hester, but Marciano did well to close him down and clear.
It took another home blunder to settle Hibs nerves in the 62nd minute. Omar was loose with a back pass which Kamberi anticipated before racing clear and finishing calmly inside the post.
Stevie Mallan nearly added a third with a powerful drive from the edge of the area which forced a good diving save from McHale.
Hibs finished the game with 10 men as substitute Martin Boyle limped off with all three subs were used, but they were still a threat, Newell forcing another good McHale save in stoppage time.