Former Tranmere and Grimsby midfielder Andy Parkinson scored the winning penalty as Prestatyn progressed after recovering from one goal down to lead 2-1 on the night, with a 3-3 draw on aggregate.
The Welsh Premier League side had been trailing going into injury-time only for Neil Gibson to hit the target and send the tie into extra-time, with the teams locked on aggregate.
Parkinson's spot-kick was then followed by a miss by Davis Ikaunieks as Prestatyn claimed a 4-3 penalty shootout victory and a second-round meeting with HNK Rijeka.
Trailing 2-1 from the first leg, Prestatyn's task was made even harder when Valerijs Afanasjevs struck after 17 minutes.
However, Ross Stephens pulled one back with 13 minutes left before Gibson intervened and Parkinson ultimately guided them through.
Fellow Welsh sides Bala Town and Airbus UK did not fare so well, though, with both narrowly going out.
Bala lost 3-2 on aggregate to Levadia Tallinn with Rimo Hunt scoring a hat-trick for the Estonian high-flyers.
Hunt cancelled out the visitors' first-leg lead after six minutes before further goals (21, 50) saw him complete his hat-trick, and although Ryan Jones pulled one back a minute from town, Bala could not force an equaliser.
Airbus UK went out on away goals after Ventspils' 1-1 draw was enough to see the Latvian side through following their goalless stalemate in the first leg.
Drogheda went down 2-0 on the night and by the same score overall against former European Cup finalists Malmo, while Crusaders were demolished 7-2 on the night and 9-3 on aggregate by former Champions League quarter-finalists Rosenborg.
Glentoran also went out with a 3-0 aggregate defeat by Reykjavik after they had held the Icelandic team to a goalless draw in the first leg.
So too St Patrick's who were in a good position in their tie against Zalgiris when they earned a 2-2 away draw.
However, they went down 2-1 on Thursday, despite Killian Brennan's penalty five minutes from time.