LOS ANGELES -- The Los Angeles Dodgers lost a no-hitter and a lead, but won what mattered: the game.

Pinch hitter Austin Barnes hit a walk-off double to boost the Dodgers to a 4-3, 10-inning victory over the Pittsburgh Pirates on Tuesday at Dodger Stadium.

Barnes doubled to right-center off reliever Daniel Hudson (0-2) to plate pinch-running relief pitcher Ross Stripling, giving the Dodgers (19-14) their fourth straight win and ninth in their past 11 contests.

"I knew I hit in the gap pretty well, and I know Ross is fast," said Barnes, who produced his first walk-off hit. "Being on the bases for a pitcher is probably not the most comfortable thing in the world, but thankfully he is pretty fast, and he got around the bases."

Kenley Jansen (2-0) struck out two in the 10th to earn the victory.

The Pirates (14-19) dropped their third consecutive game.

Dodgers rookie Cody Bellinger's RBI single with one out in the ninth brought home Corey Seager to make it 3-3.

In the eighth, Pirates pinch hitter John Jaso took reliever Pedro Baez deep with his second home run this season, driving an 0-1 pitch to right for a solo shot that lifted Pittsburgh to a 3-2 lead. It was the fourth career pinch-hit home run for Jaso.

"It didn't go as far as I thought it would go, but it was enough," Jaso said. "But it was cool. It was good to feel that swing."

Dodgers starter Julio Urias didn't allow a hit through the first six innings. Andrew McCutchen broke up the no-hit bid with a leadoff ground-rule double in the seventh.

"I was looking for something to drive," said McCutchen, who was 1-for-4 and has recorded a hit in 14 of his past 16 games against the Dodgers. "I had two good at-bats off him. Hit the ball hard first at-bat. Drove it to the warning track second at-bat, so I was just trying to stay within myself and not do too much."

On the play, Dodgers left fielder Andrew Toles got injured chasing the ball, with his right knee appearing to buckle just before he ran into the wall. X-rays were negative, but Toles is scheduled to have an MRI exam Wednesday.

Enrique Hernandez replaced Toles.

Urias was charged with a run on one hit with five strikeouts and two walks in 6 1/3 innings, but for the third consecutive start did not factor into the decision. Urias also committed an error.

"The most important part was that we got the win, and I'm just happy we were able to work that way," said Urias, who is 4-0 with a 1.24 ERA in his past 11 games (nine starts).

Dodgers catcher Yasmani Grandal said Urias possessed a good fastball but little else.

"I had the option of working with a fastball and hoping when I called a secondary pitch he would make a good pitch or at least be around the zone," Grandal said. "I feel like if he would have had one secondary pitch, he would have gone further in the game, and I think he knows that."

After Urias exited in the seventh, reliever Sergio Romo struck out pinch hitter Josh Bell looking, then gave up a run-scoring double by Francisco Cervelli that Hernandez apparently lost in the lights. The run slice the Dodgers' lead to 2-1.

Rookie pinch hitter Max Moroff followed with his first hit in the big leagues, an RBI single that scored Cervelli.

Grandal's two-run shot to center gave the Dodgers a 2-0 lead in the fourth inning. It was the fourth home run this season for Grandal, who went 3-for-5.

"I think I've been seeing the ball well the whole year," Grandal said. "I've taken good at-bats, I've taken good swings, I've hit hard balls, I've hit soft balls. It just so happens that today they just happened to fall."

Pirates starter Ivan Nova allowed two runs on seven hits with two strikeouts and two walks in 6 1/3 innings.

NOTES: The Dodgers will active LHP Hyun-Jin Ryu to start the Thursday game against the host Colorado Rockies. Ryu has been on the disabled list since April 30, when he sustained a hip contusion sliding into second base against the Philadelphia Phillies. Ryu has a 1-4 record with a 4.05 ERA in five starts. ... The Dodgers claimed LHP Justin Marks from the Tampa Bay Rays and assigned him to Triple-A Oklahoma City. In a corresponding move, OF Andre Ethier (lumbar disk herniation) was shifted to the 60-day disabled list. The Dodgers also signed free agent LHP Logan Darnell to a minor league contract. ... Pirates RHP Chad Kuhl (1-2, 5.54 ERA) will oppose Dodgers RHP Kenta Maeda (2-2, 5.81) in the series finale Wednesday.