Sri Lanka's bowlers stifled Pakistan to give the hosts a 16-run win and a place in the final of the World Twenty20.
Chasing 140 on a slow Colombo pitch, Pakistan looked in the game at 91-4, but Rangana Herath struck twice in two balls to see them stumble to 123-7.
Earlier, despite captain Mahela Jayawardene's 42, Sri Lanka looked to be struggling before taking 14 from the final over to get up to 139-4.
They will play Australia or West Indies in Sunday's final.
That will provide Sri Lanka with the opportunity to add to their triumphs at the 1996 World Cup and 2002 Champions Trophy, as well as the chance to halt a run of three final defeats in the last five years.
In addition to losing the 2009 T20 final to Pakistan at Lord's, they were beaten in the 2007 and 2011 World Cup finals, by Australia and India, respectively.
Pakistan, who have never failed to reach the last four of a World T20, have now lost their last two semi-finals, but, unlike their destruction at the hands of Australia's Mike Hussey in 2010, this was a slow death.
Though 140 was the second-lowest semi-final victory target in the history of the tournament, Pakistan were choked by Sri Lankan spin duo Herath and Ajantha Mendis, who were complemented by seamers serving up a diet consisting almost entirely of slower balls.
An opening stand of 31 between Imran Nazir and Mohammad Hafeez looked to have Pakistan on their way, but, after Nazir unluckily played on to his stumps off Mendis, the 2009 champions lost four wickets for 33 runs in five overs.
Still, they looked to be in the hunt with Hafeez at the crease, the captain lofting Herath straight for the only six of the match.
However, in his next over, Herath had his revenge when Hafeez played a horrible swipe to be stumped and, when Shahid Afridi was bowled from the next ball, the game looked up.
And, though, 16 came from the next two overs, the excellent Lasith Malinga conceded only five from the penultimate set of the match, leaving Pakistan needing 23 from the final six balls.
Nuwan Kulasekara held his nerve to put Sri Lanka into a third final from the three ICC tournaments the nation has hosted.
It was an outcome that looked unlikely as the hosts struggled during the early and middle overs of their innings.
Despite Jayawardene playing some typically eye-catching strokes, his opening partner, Tillakaratne Dilshan, was uncharacteristically subdued.
After Jayawardene fell in the 11th over, Kumar Sangakkara blasted a breezy 18, but his exit saw only 32 runs come in the following five overs.
As Dilshan and Jeevan Mendis scratched around, their departures allowed Perera and Angelo Mathews to arrive for the late injection Sri Lanka required to get up to a winning score, although they did not hit a single six in their innings.
Between them they took three boundaries from Umar Gul's final over of the innings, and those runs would prove to be crucial.