Everton needed a late goal from Tim Cahill to avoid slipping on a potential Carling Cup banana skin at Peterborough United.
Posh striker Trevor Benjamin struck in the 56th minute to cancel out the Jude Stirling own goal that had given the Premiership side the lead, but Cahill bundled the ball home from close range three minutes from time to send the Toffees into the third round draw.
Peterborough looked comfortable in defence, with Mark Arber sweeping effectively, until Everton benefited from a stroke of luck to break the deadlock.
Phil Neville curled a teasing cross into the home penalty area following a quickly taken 24th-minute free-kick. James Beattie rose to win an aerial tussle but his downward header glanced off Stirling and squirmed between the post and the diving goalkeeper Mark Tyler.
Just before the goal Justin Richards saw a shot cleared from the Everton goal-line by Joleon Lescott, and immediately afterwards referee Iain Williamson waved away Posh penalty appeals after midfielder Liam Davis, on loan from Coventry, went down under a challenge from Mark Hughes.
Once ahead Everton played the ball around without creating many clear-cut openings, although Tyler went full stretch to push away a rising angled drive from Lee Carsley.
Posh hauled themselves level early in the second half when former Leicester City frontman Benjamin reached skipper Dean Holden's corner to glance a header wide of Richard Wright, the ball just crossing the line before being hooked away by Simon Davies.
Former Posh man Davies was denied a goal to celebrate his return to London Road when Tyler went full stretch to push the ball away.
That was the signal for Everton boss David Moyes to send on the cavalry, in the shape of subs Cahill and Mikel Arteta.
The move paid dividends when Cahill was on hand to prod home from point-blank range after Tyler did well to keep out a Victor Anichebe effort, only to see the ball trickle into the path of the Australia international.