Arturs Strautins came up big for Latvia, scoring 20 points and aölso adding 4 rebounds and 3 assists
Latvia kept alive their hopes of retaining Division A status by the narrowest of margins as they edged out Montenegro in the U16 European Championship Men.
Having had by far the better of the first half and enjoying a lead which briefly stretched into double figures, Latvia found themselves in a dogfight of a second half as the lead changed hands 10 times with 10 ties in the final 20 minutes.
But Zigmars Raimo came up big for his team in a tense finish with key baskets, a block and a rebound as Latvia found a way to scrape home.
With Montenegro leading 67-66, Raimo hit back-to-back jump shots - the second with 66 seconds left - and then got in position to block Nikola Vukcevic's jump-shot at the other end before snatching the loose ball.
Montenegro were forced to foul, and Arturs Strautins split a pair of free throws to put Latvia up by four with 36 seconds left.
Their defence stood tall as time ticked down, and although Filip Bakic made a lay-up for Montenegro there were only seven seconds left when he did.
They fouled again and Latvia left the door open as both Dzeiks Krumins and Renars Birkans missed chances to put the game away, but Milos Popovic's desperate heave at the finish was off target.
Strautins led Latvia with 20 points while Kohs added 19 and Birkans 14.
Vukcevic had 21 for Montenegro with Popovic and Todor Radonjic scoring 14 each.
The result sends last year's Division B runners-up straight back down while Latvia will play Belgium for survival.