Murray regained his composure in the third after a second-set collapse
Andy Murray moved to within sight of his first ATP Tour title of 2010 after winning a topsy-turvy semi-final against Feliciano Lopez in Los Angeles.
The British number one overcame Lopez 6-0 1-6 6-4 to set up a clash with Sam Querrey in the Farmers Classic final.
Murray started the contest in breathtaking form, taking a mere 24 minutes to wrap up the opening set.
That touch deserted him in the second as Lopez levelled, but Murray recovered well to take a tight third set.
Murray quickly shrugged off the struggles with his serve which blighted his quarter-final win over Alejandro Falla, winning the first seven games of the match.
But from a seemingly unstoppable position, Murray somehow slumped to lose the next six as Spaniard Lopez managed to get back in the match.
To his credit, Murray managed to regain his composure, and an early break of serve in the third gave him the breakthrough he needed to seal the victory.
He won here last year and reached the final again this year so he obviously enjoys this court and will have a home crowd behind him
Andy Murray on final opponent Sam Querrey
The 23-year-old Scot put the curious scoreline down to a certain degree of rustiness from both players.
"Until the end, there wasn't a point where I was playing well and he was also playing well," said Murray, playing in his first tournament since splitting from coach Miles Maclagan.
"The third set was much closer but neither of us has played much since Wimbledon so maybe that explains the inconsistency."
American Querrey, meanwhile, had to save a match point and come from 1-5 down against Serbia's Janko Tipsarevic in a second-set tiebreak before going on to reach the final in front of his hometown crowd.
"That was a close one," said Querrey after his 6-7 7-6 6-4 victory.
"I came up with good shots (at 1-5 down) and thankfully pulled it out. Today was the best I have played this week."
Murray beats Querrey at Wimbledon
Murray has not lost a set to Querrey, 23, in four previous meetings, the most recent at this year's Wimbledon in the fourth round, but the top seed insisted he would have his work cut out in the final.
"He won here last year and reached the final again this year so he obviously enjoys this court and will have a home crowd behind him," stated the Scot.
"It will be very difficult."
The final will get under way at 2200 BST on Sunday.
In the doubles, there was more for the LA fans to cheer as local heroes Bob and Mike Bryan reached their 100th ATP Tour final as a pairing and gave themselves the chance to create history.
The Bryans defeated India's Rohan Bopanna and Pakistan's Aisam-Ul-Haq Qureshi 6-2 6-4 to reach the final, where they will face Eric Butorac and Jean-Julien Rojer, who overcame Britain's Ross Hutchins and Australia's Jordan Kerr 6-3 6-2 in the other semi.
The twin brothers are level with Australia's Todd Woodbridge and Mark Woodforde on 61 career ATP doubles titles, and are seeking their 62nd in LA.
"There will be some nerves," commented Mike Bryan. "We want it bad."