The defending World Series champion Giants considered this a must-win series to keep their faint playoff hopes alive but lost the final two.
Hudson allowed one run on three hits, struck out five, and walked one in seven innings. David Hernandez went 1-2-3 in the eighth and J.J. Putz pitched a perfect ninth for his 36th save.
Brewers 4, Astros 0 - Shaun Marcum allowed his only hit with one out in the sixth inning as Milwaukee completed a three-game sweep in Houston.
Marcum pitched seven stellar innings, allowing a single to center field to Jordan Schafer and two other base runners. He struck out eight and walked one.
Reds 3, Cardinals 2 - Juan Francisco capped a career-best four-hit day with the go-ahead hit in the 10th inning and visiting Cincinnati took two of three from St. Louis, which fell 9 ½ games behind Milwaukee.
Tigers 18, White Sox 2 - Miguel Cabrera homered and drove in four runs, and Detroit capped a three-game sweep by routing visiting Chicago.
Angels 4, Twins 1 - Joel Pineiro posted his first victory in almost two months and Bobby Abreu homered, leading Los Angeles over Minnesota in Anaheim, Calif.
Rays 8, Orioles 1 - Jeremy Hellickson threw a four-hitter and Reid Brignac had three RBIs as host Tampa pounded Baltimore.
Indians 9, Royals 6 - Shelley Duncan had a career high five RBIs on a pair of homers, Asdrubal Cabrera drove in two runs, and Cleveland rolled in Kansas City, Mo.
Athletics 8, Mariners 5 - David DeJesus and Ryan Sweeney each drove in two runs and Hideki Matsui doubled three times as Oakland completed a three-game sweep of visiting Seattle.
Marlins 5, Phillies 4 - Mike Cameron drove in the winning run with a two-out, bases-loaded walk in the 14th inning, and Florida benefited from an overturned ruling after a video review to beat Philadelphia in Miami.
Hunter Pence was ruled out on fan interference in the sixth inning after initially being awarded a double, and the ruling change may have cost the Phillies two runs. They played the game under protest.
The lead changed hands four times, and Florida came from behind for the second game in a row to take the series.
Mets 6, Nationals 3 - Willie Harris had a pinch-hit two-run single, highlighting a four-run rally in the sixth inning that lifted New York and spoiled what was likely Livan Hernandez’s final game in Washington.
Hernandez, who started the Nationals’ home opener in 2005, made his final start of this season, and though he’s indicated a willingness to return as a reliever, the team hasn’t indicated that it would want him back.
Braves 4, Dodgers 3 - Martin Prado hit a game-ending RBI single in the ninth inning as host Atlanta snapped Los Angeles’s six-game winning streak and avoided getting swept in a three-game series for the first time this season.
Padres 7, Rockies 2 - Jeremy Hermida and Will Venable drove in three runs apiece and host San Diego beat Colorado to snap a nine-game losing streak.
Cubs 6, Pirates 3 - Randy Wells pitched six strong innings and Marlon Byrd drove in two runs as host Chicago beat Pittsburgh to avoid a three-game sweep.