"I am lost for words," said Samoa coach Stephen Betham. "We knew Japan wouldn't just give us the Cup. We knew we had to win it off them. They played very well and forced us into making mistakes. They sure gave us a good fight."
Two early penalties from Ayumu Goromaru saw Japan take an early lead, before Japan capitalized on some Samoan indiscipline.
Logovili Mulipola's shoulder charge on Harumichi Tatekawa in the 18th minute handed Japan a one man advantage and the hosts responded in style with HendrikTui and Takashi Kikutani crossing for tries.
But within minutes of Mulipola's return, Kahn Fotualii finally got the Samoans on the board with Faatiga Lemalu adding a second as the teams went into the break with just two points separating them at 16-14.
"They [Japan] disrupted us at first when we tried to maul. So that's why we changed our plan and sucked them in before driving," said Samoa captain Lemi.
Japan's inability to stop the visitors pack saw Anufe hand Samoa the lead in the 43rd minute with a penalty, before Lemalu powered over for his second try of the day.
Lolo Lui added the conversion as Samoa led 24-16, before a second penalty by Anufe saw the lead increased to 11 with 15 minutes remaining.
Japan, however, weren't done and Kikutani powered over in the 68th minute following a good break by Toshiaki Hirose and a line-out steal close to the Samoan line.
With the crowd cheering their every move, Hirose then finished off a period of sustained pressure to go over in the corner and set up Nicholas for the conversion. But the cheers turned to groans of despair as the kick drifted wide handing Samoa the win and the silverware.
"Full credit to Japan," said Lemi. "Even though they didn't win their three games they have performed well. We were lucky and had the bounce of the ball today. But they gave us a lesson. But hats off to my guys. They dug in and that's what got us the result."