KAMAISHI, Japan (AP) — Uruguay pulled off one of the Rugby World Cup’s largest upsets when it beat Fiji 30-27 in a match laden with significance for the disaster-ravaged town in which it was played on Wednesday.

Only days after coming close to a shock result when it led Australia 14-12 at halftime before losing 39-21, 10th-ranked Fiji found itself on the wrong end of a larger surprise, going down for the first time in four meetings to the 19th-ranked Los Teros.

Fiji scored first but Uruguay scored three first-half tries to lead 24-12 by halftime. Flyhalf Felipe Berchesi kicked two penalties to keep his team in front throughout the second half, finishing with three conversions and three penalties for 15 points.

His last penalty, in the 75th minute, gave Uruguay an eight-point lead and proved decisive in securing only its third win at a World Cup, its first in 16 years. Uruguay’s other wins were over Georgia and Spain.

“I was thinking to myself to treat it just like in training, as if the stadium was empty,” Berchesi said. “I had cramps in my legs so I focused on kicking like I do in training, and aiming for the middle, inside the posts. It went through, luckily.”

Fiji threw everything at Uruguay in an effort to wrest back control of the game in the second half but its most ambitious attempts failed through passing and handling errors and it paid dearly for poor goalkicking by Josh Matavesi and Ben Volavola.

A try after the fulltime siren to Niko Matawalu - his second of the match, which typically went unconverted - was enough to earn Fiji two losing bonus points. But the result severely jeopardized its hopes of winning a place in the knockout rounds.

“It is going to be challenging for us,” Fiji coach John McKee said. “We are relying a lot on other points now and, for us, we just have to focus on our match against Georgia in eight days.

“That is the only focus for us now, to play well in that match and win the game and, if we can, securing the bonus point.”

Asked if his team had taken Uruguay too lightly, McKee said, “I hope that we didn’t.” Fiji captain Dominiko Waqaniburotu said they did: “We underestimated a very good Uruguay team, congratulations to them.”

The match was one of the most thrilling in World Cup history, full of dramatic twists and turns and brought to life by the indomitable spirit of the Uruguay team which was given a slim chance of upsetting star-studded Fiji.

“I’m really proud of my country, we’re not the biggest or tallest but we came here to win, we have been preparing for four years,” Uruguay head coach Esteban Meneses said. “We’ve never had anything granted, we always have to qualify first and you saw the passion.”

Uruguay is the youngest team at the tournament, an assembly of home-based players who mostly are semi-professional and can’t match the array of global stars which Fiji has at its disposal.

It played with magnificent discipline and organization to exploit Fiji’s errors and lead through most of the first half after conceding an opening try after only eight minutes.

It then showed extraordinary spirit to hold out Fiji as it mounted attack after attack in the late stages of the second half. The Uruguay players looked close to exhaustion and emptied their bench by the end of the third quarter.

But it continued to defend with unshakeable courage, led by captain Juan Manuel Gaminara who tackled himself to a standstill.

Fiji was denied a try in the 80th minute when replacement flyhalf Volavola lost the ball just short of the line. Matawalu then scored the final try but it came too late to shift the result.

Fiji scored twice early through hooker Mesulame Dolokoto and prop Eroni Mawi and from what appeared to be set moves. But Uruguay produced magnificent responses through scrumhalf Santiago Arana and and back-rower Diana before a try to Juan Manuel Cat ensured they led at halftime.

Fiji cut into the lead with a try to Tevita Ratuva but Berchesi kept his tiring team ahead.

The match brought consolation and new life to a fishing town struck eight years ago by a ruinous earthquake and tsunami.

It seemed almost all of the town’s population of 35,000 were in attendance, along with Japan’s Crown Prince Akishino.

Prior to kickoff at the Kamaishi Recovery Memorial Stadium both teams observed a minute of silence for the more than 1,000 people from the town who lost their lives. The March 11, 2011 tsunami destroyed 30 percent of homes, 60 percent of businesses, and the stadium is built on the site of two schools destroyed by the wave.

The somber note quickly passed, giving way to a celebration of rugby and of the town’s spirit.