Manny Machado hit a two-run single in the 10th inning, and the San Diego Padres beat the San Francisco Giants 5-2 to keep their slim postseason hopes alive with their first extra-inning win this year. San Diego had been 0-12 in extra innings and were tied with the expansion 1969 Montreal Expos for the most extra-inning losses in a season without a victory. The Padres (79-80) trail the Chicago Cubs and Miami (82-76) by 3 1/2 games for the final NL wild card spot with three games remaining. San Diego is also two games behind Cincinnati (81-78).