The Dodgers settled for a split with the New York Yankees after confusion in the outfield in the ninth inning.
The Yankees scored three runs in the top of the ninth, including two on an error by second baseman Mark Ellis, to win 3-0 Wednesday night, snapping the Dodgers' four-game winning streak.
The Dodgers ended July with a 19-6 record and own a 2½-game lead over Arizona in the NL West.
"We feel great about ourselves," Ellis said. "We had a great homestand and we're playing great baseball. We just didn't get this one."
Pinch-hitter Lyle Overbay singled in the go-ahead run with two outs in the top of the ninth off Paco Rodriguez. Robinson Cano scored after reaching on a fielder's choice groundout.
"He's always been pretty good in those situations," catcher A.J. Ellis said, "and he took advantage of a pitch that probably caught a little more of the plate than we would have liked."
The Yankees added two more runs on Mark Ellis' error a night after he drove in the winning run with two outs on Tuesday.
Ronald Belisario (4-6) got two outs in the ninth inning, but took the loss. He walked Derek Jeter and pinch-hitter Ichiro Suzuki, who both scored after Belisario was relieved by Rodriguez.
Suzuki and Overbay scored when Ellis dropped a fly ball by Jayson Nix in shallow right field. Yasiel Puig came running in as Ellis was tracking the ball with his back to the rookie, whose left hand struck Ellis' glove as the ball dropped.
"It was just a popup in a weird spot and I dropped it," Ellis said. "I heard him at the last minute, but it was too late to get out of the way. It's a play that we have all the time. It's hard to hear out there."
Boone Logan (3-2) got the win in relief.
Mariano Rivera pitched the ninth to earn his 34th save in 36 chances in his farewell season.
Dodgers manager Don Mattingly was ejected in the ninth by third base umpire Bill Miller for arguing a checked swing call on Overbay.
Former Dodgers pitcher Hiroki Kuroda and current Los Angeles ace Clayton Kershaw dueled for much of the game, with neither allowing a run. Both gave up five hits — all singles.
Kuroda struck out eight and walked one in seven innings.
"I've seen him do that for years," Kershaw said. "I have a lot of respect for Hiro and what he's doing over there. He's one of the best pitchers in the American League. I knew I was in for a tough night because he's been pitching great all year."
Kershaw struck out five and walked none on 97 pitches over eight innings of his first interleague start of the season. He lowered his major league-leading ERA to 1.87. He went 4-1 in July with a 1.34 ERA in six starts.
"I didn't have great fastball command and I was falling behind a lot of guys, but I was kind of fortunate," he said. "I got some lineouts right at some guys and I was able to keep my pitch count down, thankfully."
Jeter went 0 for 7 with a walk in the two-game series.
Both teams had scoring chances in the seventh and eighth innings.
The Yankees had runners on first and second with two outs in the eighth when Brett Gardner flied out to left field for the third out.
The Dodgers had runners on first and second with two outs in the seventh before Skip Schumaker struck out swinging to end the inning.
NOTES: Mattingly was ejected for the second time this season and 10th as a manager. ... Dodgers SS Hanley Ramirez was hitless in four at-bats with three strikeouts. He had reached base safely in 37 straight games. ... The Dodgers gifted Rivera with a custom fishing pole and a $10,000 donation to his planned church in New York. Rivera met with a select group of Dodgers employees to talk baseball as part of his farewell tour. ... The Dodgers acquired C Drew Butera from Minnesota for either a player to be named or cash considerations. Butera was optioned to Triple-A Albuquerque. ... Celebrities at the game included Kobe Bryant and LL Cool J in Magic Johnson's box, Christina Aguilera, Cristiano Ronaldo of Real Madrid, and Dallas Cowboys teammates Jason Whitten and DeMarcus Ware. ... The two games against the Yankees drew combined sellout crowds of 105,460.