SAN FRANCISCO (AP) — Derek Holland pitched three-hit ball into the seventh inning to beat his former team, Steven Duggar hit a two-run triple and the San Francisco Giants topped the Texas Rangers 3-1 on Sunday.

Holland, who won 62 games over eight seasons with the Rangers after they drafted him in 2006, was mostly sharp while notching consecutive victories for the first time this season.

READ MORE: Keri Hilson Says 'Hip Hop Family Christmas' Is All About 'Honoring Your Family, Not Living For The World'

The Giants’ lefty yielded one run and three walks with four strikeouts, then left to a standing ovation from the crowd.

Four days earlier, Holland (7-8) gained national attention after making a racially insensitive joke while appearing on MLB Network alongside Giants massage therapist Haro Ogawa in a bit that was meant to be fun. Holland later apologized for his comment.

Evan Longoria tripled and scored on a passed ball for San Francisco. The Giants won a home series for the first time since taking two of three from the Chicago Cubs in early July.

Elvis Andrus had an RBI double on his 30th birthday for Texas. The Rangers finished 2-4 on their road trip.

READ MORE: Discover DFW: Families Can Help 'Save Christmas' This Holiday Season

The Giants went ahead in the fourth.

Hunter Pence singled off Yovani Gallardo (7-3) with two outs. After Nick Hundley walked, Duggar lined a 2-2 pitch between center fielder Carlos Tocci and right fielder Nomar Mazara to put San Francisco up 3-1.

Texas stranded runners at second base in the fifth and eighth and left two on in the seventh when Tony Watson got Rougned Odor to hit a soft comebacker.

Mark Melancon retired three batters for his third save.

MORE NEWS: The Christmas Capital of Texas Is located in North Texas

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)