Kuala Lumpur qualified for the semi finals of the National Under 21 after subduing a fighting Perak 3-2 at the Taman Daya Hockey Stadium in Johor Baru.
While KL needed an outright win, Perak could have qualified had they drawn the match but the city side had striker Mohd Syamim Mohd Yusof to thank as his hattrick sunk the silver state, who at one stage came back from a two goal deficit to draw level.
And Malacca also qualified for the last four thanks to their 2-0 win over Penang.
Penalty corner strikes by Ganeisha Tamil Chelvam in the 18th minute and Mohd Huzairy Mohd Zain in the 60th minute and booked Malacca a semis spot where they will take on Pahang.
KL were 2-0 up by the 20th minute thanks to clinical finishing by Syamim.
His first goal in the 13th minute was as a result of a neat exchange of passes with Mohd Shahril Saabah with Syamim slipping the ball past the onrushing Perak keeper.
But the second was a gem as he deflected a hard hit into the semi circle by Mohd Zulhairi Hashim to put KL 2-O ahead in the 19th minute.
Perak were resilient as they crept back into the game with Mohd Soffian Kamaruddin scoring in the 21st minute.
Izzad Hakimi Jamaluddin had two golden chances to put Perak on level terms but muffed both sitters through his overconfidence as the ball was cleared off the goal-line by the KL defenders.
But Perak were not to be denied the equaliser when Mohd Sabri Mohammad converted a penalty corner in the 38th minute.
KL were unfortunate when the attempt by Shahril Sabah in the 50th minute hit the post.
But Syamim had the final say with his winner in the 62nd minute and KL will now take on hosts Johor for a place in the final.