Paulo Sergio made a winning start as Hearts manager as they strode to an easy win against Paks to grab their place in the Europa League play-offs.
A Ryan Stevenson brace put the home side 2-0 up at half time against their Hungarian opponents.
Further goals from Andrew Driver and Rudi Skacel put the tie out of reach before Daniel Bode grabbed a consolation for the visitors late on.
The Gorgie side now join Rangers and Celtic in Friday's fourth round draw.
Paks, who finished second in the Hungarian league, arrived at Tynecastle knowing they required a goal to progress, but seemed content to sit in during the early stages while Hearts applied all the pressure.
And the home side had the best of the early stages, with a series of set-piece chances in front of goal.
Ryan Stevenson had the best of those, when he connected with Ian Black's cross deep inside the penalty area but sent it right of the keeper.
That early fluency was punctured when Stephen Elliot had to leave the fray, unable to recover from a cynical foul by the Paks captain Laszlo Eger eight minutes in.
Eger was booked while Elliot was replaced by John Sutton three minutes later.
Hearts, without a win in 15 matches under previous manager Jim Jefferies, continued to apply pressure and a breakthrough came 11 minutes from half time.
Stevenson rose highest to meet Grainger's inswinging corner just six yards out, his flying header sailing past the Hungarian goalkeeper Norbert Csernyanszki who could do no more than flail a weak left hand as the ball bounced into the net.
With the Scots in the driving seat, Paks began to play with more urgency, Istvan Sipeki dragging an effort wide after just before half time.
But that chance left the Hungarians exposed, Hearts breaking quickly down the pitch and Sutton shaping to shoot before playing in Stevenson to net from an almost impossible angle on the left, the Csernyanszki again looking to be at fault.
The match ended at half-time for captain Marius Zaliukas who was replaced due to injury by Jamie Hamill at the break.
And despite the deficit, Paks looked the livelier at the restart, Bode beating three or four players before putting left foot shot just wide of Marian Kello's goal.
That resurgence wasn't to last long though. Sutton again the creator, laying the ball up for a fit-again Driver to fire home from inside the penalty box, Csernyanszki this time getting the slightest touch of the ball before it went in off the underside of the bar.
Fittingly it was Skacel who completed the scoring for Hearts, after agreeing a new deal with the club earlier on Thursday.
On the subs bench in the first half, and relaxed enough to oversee the half-time draw, the Czech picked up on the rebound from Templeton's 25 yard strike in the 76th minute to make it 4-0.
There was limited consolation for an out-classed Hungarian outfit late on when Daniel Bode headed home from close range, but Hearts progress to the play off stages in convincing style.
- 25 Kello
- 03 Grainger
- 17 McGowan
- 26 Zaliukas (Hamill - 46' )
- 04 Jonsson
- 08 Black
- 11 Driver (Skacel - 63' )
- 12 Templeton
- 16 Stevenson
- 31 Mrowiec
- 10 Elliott (Sutton - 13' )
- 30 MacDonald
- 05 Barr
- 02 Hamill
- 19 Skacel
- 15 Sutton
- 18 Novikovas
- 27 Robinson
- 24 Norbert Csernyanszki
- 18 Fiola
- 73 Eger Booked
- 06 Sifter
- 07 Balo
- 10 Kiss (Montvai - 79' )
- 13 Bode
- 16 Heffler
- 22 Sipeki
- 39 Bartha Booked
- 17 Magasfoldi (Csehi - 54' )
- 28 Pokorni
- 05 Gevay
- 09 Csehi
- 19 Meszaros
- 27 Heffler
- 20 Hrepka
- 53 Montvai