Anthony Ranaudo has had one fundamental problem early in his major league career: keeping hitters in the ballpark.

The rookie right-hander gave up two home runs, and the Boston Red Sox lost 4-0 to the Pittsburgh Pirates on Tuesday night.

Pittsburgh was powered by shots by Russell Martin and Starling Marte.

Ranaudo (3-3) lost his third straight start, giving up three runs, four hits and three walks in 5 2-3 innings. He has allowed 10 home runs in his first six big league starts.

"There was a bad pitch in there to Martin and one to Marte," Ranaudo said. "If we look back at all my starts, the common theme is home runs. I obviously have to do a better job."

Martin's two-run homer in the second inning opened the scoring, and Marte's homer in the sixth made it 3-0. That sent Ranaudo to his third straight loss after he won his first three outings.

"It's more location within the strike zone, and that's down," Red Sox manager John Farrell said of Ranaudo's home run troubles. "Those pitches, he's gotten some swing-and-miss in the past, I think he's learning that major league hitters, major league lineups are going to have more ability up and down the lineup to square up some of those pitches.

"That's been the case."

Charlie Morton (6-12) came off the disabled list to earn his first victory since July 2, combining with five relievers on a seven-hitter.

"I just wanted to go out and give what I got," Morton said. "I didn't know what was going to happen. I'm glad with the way it turned out."

Sidelined since Aug. 16 because of right hip inflammation and a sports hernia, Morton (6-12) allowed four hits in five innings, struck out six and walked two. He had been 0-3 with a 5.09 ERA in his eight previous starts.

The shutout was the Pirates' eighth this season. Boston has been blanked 15 times.

Red Sox rookie Xander Bogaerts had two hits to extend his hitting streak to nine games.

The Red Sox, who are last in the AL East a year after winning the World Series, were hitless in 10 at bats with runners in scoring positon and stranded eight runners.

MEDICAL WATCH

Red Sox: INF-OF Brock Holt is to be examined by concussion specialist Dr. Michael Collins on Thursday in Pittsburgh. Holt hasn't played since Sept. 5.

Pirates: SS Jordy Mercer was a late scratch because of lower back tightness. Clint Barmes took his place in the starting lineup. ... Marte (bruised right elbow) started for the first time since he was hit by a pitch from Philadelphia RHP A.J. Burnett last Thursday.

UP NEXT

Boston RHP Clay Buchholz (8-8, 5.19) will look to win his fourth consecutive start Wednesday night when he faces LHP Francisco Liriano (5-10, 3.53), who is seeking to win his third straight outing. Buchholz has allowed four earned runs in 21 1-3 innings in his last three starts for a 1.66 ERA. Liriano pitched a combined 14 shutout innings while winning his last two starts.

CASTILLO DEBUT WEDNESDAY

Boston planned to recall CF Rusney Castillo from Triple-A Pawtucket on Wednesday night, and he will make his major league debut. The Red Sox signed Castillo to a $72.5 million, seven-year contract on Aug. 22, the largest deal for a Cuban defector.