British number one Andy Murray retained his SAP Open title in San Jose by beating unseeded Croatian Ivo Karlovic in an epic three-set match.

Murray recovered from a set and a break down to clinch the match 6-7 (7-3) 6-4 7-6 (7-2) for his second ATP Tour title.

Murray had the first and only break point in the first set in the fifth game but squandered the chance as the world number 103 Karlovic held to edge 3-2 ahead.

The set went with serve to 6-6 and in the tie-break it was the 6ft 10in Karlovic who held his nerve. He forced a mini-break on the Murray serve to go 4-3 ahead, earning himself three set points and wrapping it up at the first time of asking with a second mini-break. The giant Croatian fired down 12 aces in the first set to Murray’s two.

The pair traded breaks at the start of the second set but Murray levelled the match when he took a first set-point opportunity at 40-30 on the Karlovic serve in the 10th game.

The 27-year-old Karlovic was unable to take a chance to break in the first game of the decisive set, which ran with serve to 5-5.

Murray also found himself up against it in the 11th game but saved a break point before eventually holding.

The 19-year-old had a championship point on the Karlovic serve in game 12, but the big man held to force a decisive tie-break.

Murray claimed a vital mini-break on the second Karlovic serve, and when he secured a second to go 5-2 ahead he had the chance to serve out for the title.