The Pittsburgh Pirates had some room to breathe in the NL wild-card standings after a series win over the weekend against one of their main pursuers.
A series against a team far from playoff contention has been more problematic.
The Pirates will try to avoid a three-game sweep by the San Diego Padres on Wednesday.
After taking two of three at St. Louis last weekend, Pittsburgh had a two-game lead over St. Louis for the last wild-card spot.
However, the Pirates have lost the first two games of this set, including 7-5 in 10 innings Tuesday, cutting their lead to one-half game over the Cardinals and Los Angeles Dodgers.
"I hung a changeup and (Headley) hammered it," McCutchen said. "That wasn't what I was wanting. Jones' home run was clutch and I wanted to come in there and help. Walking the leadoff guy was a no-no. I threw a cookie to him 3-2 and paid for it."
The Pirates (67-56) have lost 14 of 23 since July 28, when they were two games behind Cincinnati for first place in the NL Central and led the NL wild card. They are 4-9 against NL West teams during that stretch, losing four of five to the Padres (55-70).
Pittsburgh is one of several teams that has struggled to win recently at Petco Park. San Diego has won three straight and 13 of its last 17 there and has scored seven or more runs in three of its last four home games.
Headley's homer was his ninth this month with 26 RBIs, both major-league highs.
Andrew McCutchen is having a much tougher stretch in August. He's hitting .200 (10 for 50) with 14 strikeouts with one home run in his last 12 games. He's 2 for 10 in this series and 4 for 23 against the Padres this year.
Pittsburgh, which hasn't been swept in a three-game series since losing three at Baltimore in June, will hand the ball Wednesday to James McDonald (11-5, 3.61 ERA), who tries to build off one of his better starts in a month.
McDonald gave up two hits and struck out seven in six scoreless innings of a 2-1 win over St. Louis on Friday. He had an 8.71 ERA over the previous six starts.
"You see people go through ruts like that," McDonald said. "What makes you a better player is getting through it. That's how I'll remember this time."
The right-hander's previous start came against the Padres. He was charged with seven runs and seven hits in 4 1-3 innings of a 9-8 loss on Aug. 10, but didn't factor in the decision.
McDonald is 1-1 with an 8.64 ERA in four career starts against San Diego while also making three relief appearances.
Andrew Werner will make his major league debut for the Padres.
The 25-year-old left-hander was 1-2 with a 5.79 ERA in four starts with Triple-A Tucson after going 4-8 with a 3.23 ERA in 18 starts at Double-A San Antonio.
"I didn't think there was any shot," Werner told the Padres' official website. "I'm just really excited to be here."