Dubai: Ireland beat Afghanistan by five wickets to win the World Twenty20 qualifying event and avoid England at the tournament proper in Sri Lanka.
With the Irish chasing 153 to win, Paul Stirling hit the second-fastest half-century in Twenty20 international history, from only 17 deliveries.
His 79 helped Ireland home with seven balls to spare in Dubai.
They join Australia and West Indies in Group B, with Afghanistan, India and defending champions England in Group A.
Ireland had beaten Namibia earlier in the day in the preliminary final to book their trip to Sri Lanka in September.
With a place at their second successive World T20 at stake, William Porterfield's men restricted the African side 94-6, seamer Max Sorensen taking 2-8.
The Irish then needed only 61 balls to reach their target, Stirling plundering a 32-ball 59 for his first half-century of the day.
With Ireland and Afghanistan now both assured of a place in tournament with the Test-playing nations, the two sides met in the qualifying event final to determine where they will be placed in the main draw.
The Afghans, previously unbeaten in the qualifiers, were indebted to Mohammad Shahzad's 77 for their total of 152-7, as Kevin O'Brien picked up 2-18 for Ireland.
Ireland lost Porterfield, bowled by paceman Dawlat Zadran, from the first ball of their reply before Stirling went on the offensive.
His 38-ball stay included nine fours and a six as he added 80 for the third wicket with Gary Wilson (32).
Stirling and O'Brien fell in successive balls to Zadran, leaving Wilson to steady the ship and Andrew Poynter (23) to hit the winning runs.
The win adds to the recent success enjoyed by the Irish, who have scored wins over Pakistan and England at the last two 50-over World Cups.
Fastest T20 International fifties
Afghanistan 152 for 7 (Shahzad 77, O'Brien 2-18, Sorensen 2-26)
Ireland 156 for 5 (Stirling 79, Wilson 32, Zadran 3-21, Alam 2-34)
Result Ireland won by 5 wickets
MOM Paul Stirling (Ireland)
Man of the series R van Schoor (Namibia)