LOS ANGELES (AP)—Sam Querrey fended off a match point in the second set and rallied to beat Andy Murray 5-7, 7-6 (2), 6-3 in the Farmers Classic final on Sunday.

Querrey successfully defended the title he won last year in his hometown, winning four three-set matches during the week. He became the first player to repeat in Los Angeles since Andre Agassi in 2001-02.

“In the second and third sets I played great, some of the best tennis I’ve played,” he said. “It was easier today with everyone behind me.”

Earlier, Bob and Mike Bryan won their record 62nd career doubles title on the ATP Tour, the twin brothers defeating American Eric Butorac and Jean-Julien Rojer of Netherlands Antilles 6-7 (6), 6-2, 10-7 tiebreaker.

“It’s a flood of emotion,” Bob Bryan said. “Never thought we’d be this healthy, this consistent our whole career.”

Down a set and match point in the 10th game of the second set, Querrey came up with a combination of big serves and gambling shots to beat Murray, ranked fourth in the world, and collect his fourth title of the year. Only Rafael Nadal has more with five.

“That’s the highest-ranked guy I’ve ever beat,” Querrey said.

Querrey became the first player since last year to win two matches from match point down in the same tournament. He saved one match point in the semifinals against Janko Tipsarevic.

“I wasn’t going to give it to him,” Querrey said about Murray. “I was going to make him come up with a shot to beat me.”

Murray was a first-time visitor to Los Angeles, coming in as the top seed to replace Novak Djokovic, who withdrew before the tournament because he needed more rest.

“I’ve got to be happy getting to the final and having chances to win,” he said. “I didn’t play my best tennis. Just tired.”

Second-seeded Querrey beat Murray for the first time in five career matches. He had never even taken a set off the Scotsman until winning the second set tiebreaker with a forehand winner.

Querrey earned the only break of the third set in the sixth game, when Murray netted a forehand and angrily punched his racket strings, bloodying his right knuckles.

Murray threatened to break in the final game at 40-30, but Querrey came up with a winning forehand for deuce. Murray returned a big serve long, then missed another backhand on match point.

The Bryans had shared the ATP record with Australians Todd Woodbridge and Mark Woodforde, who won 61 titles.

“The Woodies put a record way out there. Sixty-one was Mount Everest when we started,” Mike Bryan said. “We love what we do. To get this, one of their many records, is special.”

Woodforde was on hand to congratulate the brothers.

“For many, many years you’ve been traveling in elite company. Thanks to the victory today you’re in rarefied air. You guys stand together as one,” he said. “I know this 62nd victory has been waiting since May. Our run sort of ended because I elected to retire, but I know you two will continue for years to come. The floodgates will open entirely, so I know 70, 80 will come.”

The Bryans won their sixth title in the tournament at the Los Angeles Tennis Center on the UCLA campus, not far from their hometown of Camarillo in Ventura County, not far from where Querrey grew up in Thousand Oaks.

It was their 16th consecutive match win in the Farmers Classic. Mike jumped into Bob’s arms to celebrate in front of several family members, including parents Wayne and Kathy.

“We really looked up to the Woodies,” Bob Bryan said. “They didn’t have the power and big serves, but they had the poaching and the technique. To share this record with my brother is everything.”

The 32-year-old brothers turned professional in 1998 and won their first ATP doubles title in 2001. They’ve won seven Grand Slam titles together, including last year’s Australian Open. As kids, they were forbidden to play each other in singles tournaments, and if the draw matched them up, they would alternately default.

There were no service breaks in the first set, when the Bryans blew two leads in the tiebreaker. Butorac and Rojer won the final three points to take the tiebreaker.

The Bryans rallied to win the second set, which featured five service breaks.

In the match tiebreak—the first to 10 points with a two-point margin wins — the Bryans raced to a 5-0 lead as fans chanted for them. Butorac and Rojer twice got back to level, the last at 7-all, before the brothers won the final three points to make history.

Butorac and Rojer were playing their first final together.