Samoa's reward for the gripping victory that went to the wire is a place in the last four to play tournament hosts England at Arsenal's Emirates Stadium in London on November 12.
England beat a shell-shocked Samoa 60-6 in the opening game of the tournament, a result Matt Parish's South Sea Islander team will hope to banish from recent memory.
Reigning champions Australia face New Zealand in the opening semi-final on Friday at Elland Road in Leeds.
"I want to thank all of our supporters and all the Samoans around the world. That performance was for you. We worked hard for each other. We didn't want to let anyone down," Milford told BBC.
"My legs were gone 20 minutes into the last period but we fought really hard as brothers and stuck together.
"We completed our sets and defended as hard as we could.
"On to next week now. We have enough in the tanks."
In an electric start, Samoa's Jaydn Su'a scythed through the line before stepping the full-back for a fifth-minute try Stephen Crichton converted.
There was an almost instant response from Tonga as Will Hopoate found winger Daniel Tupou who stretched to dot down in the corner.
Samoa, with NRL veteran Milford dictating passages of play from stand-off, got their second try when Jarome Luai cut back to beat two defenders before diving in under the posts, Crichton converting.
Sio Siua Taukeiaho kept Tonga in the game with a try converted by Isaiya Katoa, and the Tongans drew level at 12 points apiece with a penalty in the 50th minute.
Crichton booted a penalty to restore Samoa's lead, followed almost immediately by a soft Brian To'o touchdown from a Milford crosskick after a searing break by outstanding Sydney Roosters full-back Joseph Sua'ali'i.
Crichton converted to make it an eight-point lead.
But Tonga guaranteed a tight finish as Katoa ran in from 50 metres after a smart Moses Suli offload, converting his own try to make it 20-18 to the Samoans with eight minutes to play.
Tonga pressed, but a grubber kick rebounded into Samoan hands and the team in blue saw out their set of tackles to seal a first-ever World Cup semi-final berth.
"There wasn't much between either team, it was just tenacious defence at the end. Tonga threw everything at us," Samoa coach Parrish said.
"I said to the players they had the chance to make history at half-time and reach the semi-finals for the first time. But I didn't say much. They knew what to do.
"Our full-back Joey [Joseph Sua'ali'i] at 19, to play like that. You talk about bruising encounter, it was a sensational game.
"I haven't thought about the semi-final yet. I will enjoy this and think about it tomorrow."
England captain Sam Tomkins, working as a studio pundit for BBC for the match, insisted that minds would not be stuck on his side's opening drubbing of the Samoans.
"We won't be looking back at that first game," he vowed.