Hagen's victory was his seventh stage win of the season
Edvald Boasson Hagen sealed a hat-trick of Tour of Britain stage wins, claiming stage seven at Drumlanrig Castle.
The Team Columbia rider made his break approaching the castle and just pipped Matt Goss and Danilo Di Luca.
Ben Swift lost the polka dot jersey and Hagen's win took the Norwegian top of the points event for the first time.
For the fourth straight day, Geoffroy Lequarte retained the yellow jersey and holds six-second leads over Merseysider Steve Cummings going into the last day.
There was a wet start at Glasgow Green for the 153km run to Drumlanrig.
After a sedate opening 35km, two-time stage winner Boasson Hagen and stage one victor Matt Goss led an eight-man break.
The break riders continued to extend their lead from the peloton and had gained a two and a half minute lead at the Glespin sprint before reaching a peak of over seven minutes at the 75km mark.
I just hope I can keep up the good work heading into the final day
Cummings made a break to try to catch the leading eight at the third King of the Mountain climb of the day at Mennock Pass but he was reeled in by the peloton on the descent.
Their lead was reduced to just over two minutes as they came off the pass and raced to the finish before Cameron Meyer tried for the line three kilometres out.
Team Columbia's Greg Henderson dragged him back to help Boasson Hagen get on his tail and once the impressive Norwegian hit the front he was never in danger.
Lequarte was in optimistic mood as the event heads for its finale.
"It was a very tough sprint because Steve Cummings made a break on the last climb and he got away which we couldn't afford to happen.
"But as a team we stayed calm because we knew we could catch him and I have to thank my team for helping me stay calm.
"They all worked hard for me and made sure I was able to keep my jersey and I am confident I can keep hold of it until the end."
Hagen was quick to acknowledge the work of his colleagues afte his latest success.
"I have to thank my team because again they helped me out hugely at the finish," the 21-year-old explained.
"It was a very hard stage but I'm delighted because I started the race today hoping to get a jersey and I managed to get the green one which is great.
"I just hope I can keep up the good work heading into the final day."
Leading final positions after Stage 7 (Glasgow - Drumlanrig Castle, 153km):
1 Edvald Boasson Hagen (Nor) Team Columbia 3hrs 45mins 18secs
2 Matthew Goss (Aus) Team CSC - Saxo Bank at same time
3 Daryl Impey (SA) Barloworld at same time
4 Danilo Di Luca (Ita) LPR Brakes - Ballan at same time
5 Julian Dean (NZ) Team Garmin-Chipotle-presented by H30 at same time
6 Fred Rodriguez (USA) Rock Racing at 0.05
7 Cameron Meyer (Aus) South Australia.com-AIS at same time
8 Greg Henderson (NZ) Team Columbia at 0.26
9 Kristof Goddaert (Bel) Topsport Vlaanderen at 2.18
10 Roger Hammond (GB) Team Columbia at same time
General classification after stage 7:
1 Geoffroy Lequarte (Fra) Agritubel 25hrs 02mins 25secs
2 Steve Cummings (GB) Barloworld at 0.06
3 Daniel Martin (Irl) Team Garmin-Chipotle-presnted by H30 at 0.14
4 Gabriele Bosisio (Ita) LPR Brakes - Ballan at 0.15
5 Ian Stannard (GB) Team Great Britain at 0.16
6 Daniel Fleeman (GB) AnPost-M.Donnelly-GrantThornton-SeanKellyTeam at 0.18
7 Benny De Schrooder (Bel) AnPost-M.Donnelly-GrantThornton-SeanKellyTeam at 0.19
8 Frederik Veuchelen (Bel) Topsport Vlaanderen at 0.28
9 Emilien Berges (Fra) Agritubel at 0.40
10 Russell Downing (GB) Pinarello RT - Canditv at 1.24