Goals from Evan McMillan and Derek Doyle sent St Patrick's Athletic into the Third Qualifying Round of the UEFA Europa League.
Trailing 2-1 from the first leg, McMillan put Pat's ahead in the tie on away goals when he headed in from Stephen Bradley's corner on 14 minutes.
Doyle doubled the lead on the night when he got on the end of Derek Pender's cross and smashed the ball past Karagandy goalkeeper Alexsandr Mokin.
Pat's will now meet Karpaty of Ukraine in the next round.
Trailing 2-1 from that game last Thursday afternoon but with the vital away goal by David McMillan, Pat's knew that even a 1-0 win would do them. However it was the visitors who looked the more lively from the start and Pat's goalkeeper Gary Rogers made several early saves to keep his side in tie.
Rogers stuck out a leg to block Sergei Khizhnichenko's shot from Kairat Utabayev's pass on six minutes and dived well to save from Gediminas Vicius on ten minutes.
Pat's grew in confidence as the game progressed and the vital breakthrough came for them on 14 minutes. Bradley floated in the free kick and McMillan rose highest in the box and headed past Mokin from close range at the Inchicore end goal.
That goal put Pat's ahead on away goals in the tie and stung Karagandy back to life. The visitors enjoyed plenty of possession in and around the Pat's box but they were unable to fashion a clear-cut chance.
Maksat Bayzhanov tried his luck with a shot but there wasn't enough power in it to trouble Rogers, while Aldin Džidic gave Pat's a real scare when he struck the woodwork with his header.
Pat's were shouting for a penalty when Daryl Kavanagh was brought down in the area by Alexsandr Kirov, having dashed into the box to meet a Shane McFaul pass. However, referee Sebastien Delferiere from Belgium waved away the pleas.
Bradley and McMillan combined again on 40 minutes and nearly repeated their earlier success but, when Bradley's delivery came in, McMillan could only find the side-netting.
Pat's had another reasonable shout for a penalty as the first half entered injury time. Utabayev appeared to handle Danny North's shot on the deck but, again, the Belgian official saw nothing and waived play on.
The positive attitude that Pat's had shown in the opening half minutes after the break. Brian Shorthall should have done better on the hour mark when he met Bradley's corner from the left but arrowed his header wide.
Saints continued to probe and test the Karagandy back line and with 20 minutes to go, they had a crucial breakthrough. Pender provided the ball in from deep on the right wing and Doyle pounced to stab the ball past Mokin at his right hand upright.
Despite a strong finish from the visitors, the Inchicore side held on to ensure that they progressed through two rounds of European football for the third time in four seasons.