Ronnie O'Sullivan captured his first ranking title since September 2009 after beating Stephen Maguire 9-7 in an absorbing German Masters final.

O'Sullivan hit 111 to win the opening frame but scored only 13 points in the next three as Maguire's 130, 106 and 128 gave him a 3-1 interval lead.

The last four afternoon frames were shared to give the Scotsman a 5-3 lead.

O'Sullivan, who was within one ball of defeat in the first round, moved 8-6 ahead and duly completed a fine win.

The 36-year-old, who has been playing despite suffering from glandular fever symptoms, had slipped to 16th in the world rankings at the start of the tournament and was in danger of falling outside of the elite group for the first time since he was a teenager.

Had he done so he would not have been granted an automatic place at the World Championship, an event he has won on three occasions, and would have faced a gruelling series of qualifying matches.

He seemed set to lose the final after Maguire extended his lead by winning the first frame after the interval following breaks of 46 and 69.

Maguire was also well placed in the next, but after compiling a 40 he later attempted a difficult red into the centre which allowed O'Sullivan back in, The Rocket took advantage and rattled in a clearance of 89.

NOTABLE O'SULLIVAN TITLES World Championship: 2001, 2004, 2008 UK Championship: 1993, 1997, 2001, 2007 Masters: 1995, 2005, 2007, 2009

O'Sullivan levelled after a fluctuating 12th frame and a break of 67 put him ahead for the first time since the opening frame.

After falling two frames behind, Maguire knocked in a clearance of 82 to keep the match alive but O'Sullivan responded with a 46 in the next, but after fluking a red to leave his opponent needing snookers, went in-off following an escape.

However, Maguire missed with an attempt at a difficult long blue, leaving a grateful O'Sullivan the chance to pot the winning balls.

"I'm coming to the end of my career so every victory now is nice," O'Sullivan said after collecting the trophy. "If I can nick a tournament here or there it's great - it would be nice to go out at the top.

"This is the best venue we play in on the tour. It used to be Wembley Conference Centre... but it's brilliant to play here and get to the final.

"All credit to Stephen, because he's had a great tournament.

"He's played really well and is playing as well now as when he first came on the scene and I tipped him to be the dominant player of the decade.

"He outplayed me today, I hung in there and nicked frames."

Maguire, whose last title remains the 2008 China Open, said: "I should have made it 7-5 but I played a bad positional shot and when it went 6-6 he had the rhythm - I think that was the turning point in the match.

"I've beaten some good players this week and if I'm honest I probably wasn't expecting to get to the final - but I can't look at it that way now... I just want to jump off a bridge."