Spain notched its third consecutive victory in Olympic men's basketball Thursday but got a scare from an unheralded British side before pulling out a hard-fought 79-78 win.

After witnessing Brazil struggle in a tight 67-62 win Tuesday over Britain and Argentina trail by 14 points on Thursday against lowly Tunisia before rallying for a comfortable victory, Spain seemed determined to avoid any drama in its third Group B game.

The Spaniards raced out to 6-0 lead and then, despite a series of buckets by Britain's Joel Freeland, a member of the NBA Portland Trail Blazers, held a 24-15 advantage at the end of the first quarter.

Spanish coach Sergio Scariolo went to his bench a few minutes earlier than usual and opted for a twist on his usual substitutions, inserting 6-foot-9 Victor Claver, Freeland's NBA teammate, at small forward.

Lacking depth, Britain kept the same line-up and managed to keep the score close at the half, down just 37-28.

Spain then gained a little more breathing room in the third quarter - which ended with the Iberian nation up 60-48 - but never seemed to find its rhythm in a game filled with constant stoppages in play.

The Spaniards then were forced to sweat out the final quarter, with the Brits thrilling the home crowd by getting the score down to three points with a bucket by NBA Chicago Bulls star Luol Deng before Los Angeles Laker forward Pau Gasol answered for Spain.

Britain then shrunk the lead to 71-69 with a basket by Freeland and got to within two again with 17 seconds to go, but the Spaniards' experience and solid free-throw shooting down the stretch enabled them to close out the game.

Deng nailed a three pointer in the waning seconds to bring the lead down to one but the Brits were unable to get the ball back again.

Spain was led by Toronto Raptors point guard Jose Calderon, who scored 19; Gasol, who notched 17; and his brother, Memphis Grizzlies center Marc Gasol, with 12.

Deng scored 26 to lead all scorers, while Freeland also had a big game for Britain with 25 points. EFE