Gary Ballance hit his second fifty in three days after being dropped by England but it was not enough to prevent Yorkshire from losing to Surrey by six runs in the Royal London Cup at the Kia Oval.
Ballance survived an early drop by Gareth Batty when on three and looked like making Surrey pay when he got to 77 off 97 balls, helping Yorkshire close in on a target of 266.
But he then swept Zafar Ansari straight to deep square leg and the task of scoring 22 off the last 16 balls proved beyond the Yorkshire tail.
Surrey had set them a challenging target thanks to an eighth wicket stand of 66 in seven overs between Ansari, who finished unbeaten on 66, and Tom Curran, who made 44.
When launching their reply, Yorkshire soon lost Andrew Gale lbw to the impressive 17-year-old Sam Curran, but Alex Lees and Maxwell gave them a solid foundation with a second wicket partnership of 67.
Lees made 28 and Maxwell 55, his second highest score for Yorkshire, and it looked as though Yorkshire would coast to victory when Ballance was sharing stands of 65 with Jack Leaning and 41 with Andrew Hodd.