SCOTTSDALE, Ariz. -- Brandon McCarthy pitched four strong innings as the D-backs beat the Dodgers, 4-1, on Wednesday in the Cactus League opener for both teams at Salt River Fields.

McCarthy, who is trying to rebound from a disappointing 2013, allowed one run on four hits and walked one while striking out a pair in throwing 52 pitches.

It was a less-than-stellar debut for Dodgers ace Clayton Kershaw, who threw 42 pitches over two innings and gave up five hits, including two doubles and a triple while allowing three runs.

In fairness to Kershaw, his defense did not help him out as left fielder Carl Crawford misplayed A.J. Pollock's line drive, letting a catchable ball past him for an RBI triple. One batter later, Aaron Hill singled home Pollock to give the D-backs a 3-0 lead.

"He's good," D-backs manager Kirk Gibson said of Kershaw. "You could argue he's the best there is, so it was a good challenge for us today. We'll see him a lot this year, so it'll be cat and mouse all year."

"The results weren't very pretty," said Kershaw, the reigning National League Cy Young Award winner. "My body and my arm feel good. Obviously a lot to work on. I'm a results-based guy and I have to see results -- outs. Today left a lot to be desired. The hitters told me by how hard they hit the ball."

The D-backs scored a run in the first inning when Martin Prado doubled home Hill on a drive to the wall in left, and Shelley Duncan singled in Chris Owings in the eighth.

Owings and Didi Gregorius are competing to be the D-backs' starting shortstop this spring, but they shared an infield in the latter part of this one, with Owings playing second and Gregorius manning short. They both went 1-for-2.

The Dodgers got on the board in the third when Yasiel Puig doubled home Crawford. Puig went 2-for-3 on the day.

Rule 5 roster hopeful Seth Rosin struck out five D-backs in two innings of relief in an impressive Dodgers debut.

J.J. Putz, Brad Ziegler and Addison Reed each turned in a scoreless inning of relief for the D-backs.

Up next: The Dodgers and D-backs play again at 12:05 p.m. PT on Thursday, this time at Camelback Ranch. The regular position players who missed the opener at Salt River Fields will be in the lineup -- Hanley Ramirez, Adrian Gonzalez, A.J. Ellis and Andre Ethier. Right-hander Zack Greinke will get the ball for his first start.