China's Ding Junhui

China's Ding Junhui beat fifth seed Judd Trump 13-10 to reach the quarterfinals of the world championship here on Monday while five times titlist Ronnie O'Sullivan was edged out 13-12 by Barry Hawkins.

Trump fought back from 12-7 down to 12-10, but former world number one Ding clinched victory in the 23rd frame to reach the last eight at the Crucible for the second consecutive year.

Ding, who has dropped to 17th in the rankings, breezed through three qualifying rounds losing just seven frames, before he beat Martin Gould and now Trump.

The Chinese star, whose best result at the snooker worlds was a semifinal spot in 2011, faces Mark Williams over 25 frames on Tuesday and Wednesday.

"It got harder at the end and Judd played some very good shots," said Ding, winner of 11 ranking titles. "It didn't matter how well I played, I just had to win the frames.

"I think it helped to play in the qualifiers because my form came back a bit and it helped me get ready for the Crucible. If I can play 80 per cent or 90 per cent that is all I need. I can't play 100 per cent, that's impossible.

"Mark Williams has had some rest for tomorrow, I've just got to keep going. I just play my snooker, it doesn't matter who I play. If you get chances to win frames you have to take them, it's simple. I am looking forward to tomorrow," he said.

In the best match of this year's championship so far, Hawkins fended off a late rally from O'Sullivan, taking a tense deciding frame after being hauled back from 12-9 to 12-12.

World number 11 Hawkins had not beaten O'Sullivan for 14 years, losing their last nine meetings including the 2013 world final and this season's Masters final. The 36-year-old Hawkins, the only player to reach the semifinals in each of the last three years, takes on Marco Fu in the last eight.

O'Sullivan said: "Barry deserved his victory, he's a top class player, but obviously I'm disappointed to have not won.

"The decider wasn't my type of frame, if there was a weakness in my game it was definitely on the tactical side. I lost all of the frames where safety was involved. I was like a golfer who birdies 15 holes then gets a triple bogey on the last three."