© Getty Images
Kyrgios took the first set on a tie-break 7-6(4) with hardly anything to separate the two.
Raonic responded quickly by winning four games on the bounce and then eventually winning the next two sets 6-2 6-4.
The eighth seed had momentum on his side and took the final set to a tie-break, winning 7-6(4) on Court No 1.
With the Australian's remarkable run coming to an end, it is the Canadian Raonic who advances to the last four by winning 6-7(4) 6-2 6-4 7-6(4).