Kevin Harvick pulled away late to win the Toyota Save Mart 350 after Martin Truex Jr. encountered engine troubles on Sunday.
Truex probably should have won at Sonoma, but engine troubles late in the race saw him withdraw.
His loss was Harvick's gain as he pulled away to become the ninth driver in as many years to win at Sonoma.
It was Harvick's 36th Cup series win, but first since October 2016, and he led a 1-2-3 finish for Ford as Clint Bowyer and Brad Keselowski followed.
Denny Hamlin and Kyle Busch rounded out the top five.
Harvick had driven a Chevy for his entire career, but switched to the Stewart-Haas Ford team this year.
"This was worth the wait," Harvick said following his first career win at Sonoma. "I'm just really proud of everybody. We had a great strategy and it paid off."
Truex won the race's first stage - his NASCAR-leading 11th stage win of the season - and led most of Sunday's race before his engine blew while he held a commanding lead late in the race.
Jimmie Johnson, who won the second stage for his first stage victory of the year, finished 13th.
The race's second stage featured a strange moment when Ricky Stenhouse Jr. and Danica Patrick, NASCAR's most-famous couple off the track, had a hard collision.
Both drivers were uninjured, but Stenhouse's Ford suffered extensive damage, forcing him out of the race. Patrick remained in contention and finished 17th.
Pole-sitter and last week's race winner Kyle Larson finished 26th.
There was a wreck on the final lap as Kasey Kahne went into the wall, but the caution flag did not come out until Harvick passed under the chequered flag. Kahne was able to walk away from the accident and finished 24th.
Fan favourite Dale Earnhardt Jr. finished sixth and his final season in NASCAR continues without a win. His best chance to clinch a play-off spot could come in next week's Coke Zero 400 at Daytona, a track where he has won four times in his Cup Series career.