Latvian fans at the FIBA World Cup were thrilled to see their team defeat defending champions Spain in their match in Jakarta ©Getty Images

Debutants Latvia, world ranked 29th, producing a stunning late recovery to inflict a first defeat on Spain, the defending world and European champions, in the International Basketball Federation (FIBA) World Cup.

Eleven points down with five minutes remaining in the final quarter of their opening Group L match at the Indonesian Arena in Jakarta, Latvia managed to establish themselves in the lead at 65-63.

A three-pointer from their man of the match Davis Bertains, who plays for National Basketball League side Oklahoma City Thunder, sent them on towards a 74-69 win which put them top of the group ahead of the world number one seeds, with both now on seven points.

Bertains, 30, claimed 16 points, while Willy Hernangomez was Spain’s top scorer with 14.

Today saw the first matches of the second round featuring teams that finished in the top two of the initial group stage, with teams carrying their results forward.

Two matches will be played in this second round, with the top two in the group progressing to the quarter-finals.

Spain had won all their opening group matches while Latvia had finished second in their opening group after being beaten 101-75 by Canada.

Latvia will now seek to progress to the knockout stage in their first World Cup - which is being jointly staged by Philippines, Indonesia and Japan - when they play their second fixture against Brazil on Sunday (September 3).

Spain will need to win their second match against Canada.

"I'm really proud with the way we stayed in the game, despite the little moment where we shook as a team during the third period,” the Latvia head coach Luca Banci told FIBA.

"In general, it was a very tight game with 14 lead changes.

"To see the guys fight and compete with such a powerful team, a world and European champion, makes me very proud."

The second Group L match saw another surprise as Canada, who won all of their opening group matches, lost 68-65 to Brazil after being level at 60-60 with one minute and 36 seconds of the match remaining.

There was a rude awakening too for the Dominican Republic, who finished top of Group A with three straight wins but who were beaten 102-97 in the second match of Group I, which is being staged at the Areneta Coliseum, Quezon City in the Philippines.

In the earlier Group I match Italy, ranked 10th, and having finished second in their opening group, produced a surprise 78-76 win over Serbia.

With Italy due to face Puerto Rico on September 3 and the Dominican Republic playing Serbia things could hardly be closer, with all four teams on seven points.

In Group J - being played at the Mall of Asia Arena, Pasay in the Philippines, the United States, World Cup winners in 2010 and 2014, earned a fourth successive victory, beating Montenegro 85-73.

They top the group, but Lithuania are level with them on eight points thanks to a 92-67 win over Greece.

Germany also won a fourth match in a row, beating Georgia 100-73 in Group K, which is taking place at the Okinawa Stadium at Okinawa City in Japan.

A 91-80 win over Australia in the second group match of the day means Slovenia are just behind the Germans, also with four wins from four - and also guaranteed one of the two top teams places in the quarter-finals.