BOSTON - The Red Sox hit the ball well for the second straight game. They won because the Washington Nationals kept having trouble fielding it.

Two errors by pitcher Blake Treinen helped Boston erase a seventh-inning deficit, and the Red Sox beat Washington 8-7 Tuesday night as the Nationals struggled defensively for the second day in a row.

"It's not going to happen every day," Boston's Hanley Ramirez said, "but you've got to take advantage when that happens, so that's what we did."

The Red Sox had 14 hits in Monday's 9-4 win in which Washington centre fielder Michael A. Taylor let two balls drop for singles in a four-run third inning when Boston took an 8-0 lead .On Tuesday, the Red Sox finished with 11 hits, including a solo homer by Dustin Pedroia.

"It's the same recipe," Washington manager Matt Williams said. "If you put all the ingredients together the same way every time, then you're going to get the same meal."

The Red Sox had no hits in the seventh but scored three unearned runs, with the help of three errors, to take an 8-7 lead.

Ramirez reached first base on a fielding error by shortstop Ian Desmond before Shane Victorino was hit by a pitch from Matt Thornton. After Mike Napoli's flyout sent Ramirez to third, Treinen replaced Thornton and hit Allen Craig, loading the bases.

Treinen (0-1) fielded Ryan Hanigan's bouncer in front of the plate, dropped the ball as Ramirez scored, then threw it past catcher Wilson Ramos as Victorino came home with the tying run. Craig scored the go-ahead run on Brock Holt's groundout.

"I just felt like I got to it perfectly fine. I was telling myself just to be smooth and get it to the plate," Treinen said. "Then the transition in between my glove and my hand, I just bobbled it, it fell to the ground. I just kind of had to get rid of it quick and made a terrible throw."

Boston third baseman Pablo Sandoval left the game in the top of the sixth with a bruised left foot after being hit by a pitch in the bottom of the third. Manager John Farrell said the foot became sore as the game progressed but an examination showed no fracture.

Edward Mujica (1-0) got the win and Koji Uehara got his first save by finishing a perfect ninth — after Ryan Zimmerman's shot went just to the left of the left-field foul pole — one day after being activated from the disabled list.

"Much like we've seen a lot from Koji," Farrell said. "Three up and three down."

Nationals starter Stephen Strasburg allowed five runs and 10 hits in 5 1-3 innings, leaving him with a 6.75 ERA.

Washington reached Justin Masterson for six runs in the fifth as they sent 10 batters to the plate.

Masterson retired leadoff hitter Yunel Escobar then loaded the bases when he hit Jayson Werth with a pitch, gave up a single to Harper and walked Zimmerman. Clint Robinson then singled in a run and another scored when Ramos grounded out. Desmond doubled in two runs before a triple by Taylor drove in two more, putting Washington ahead 7-5.

RUDE RETURN

Masterson pitched in Fenway Park for the team he started his career with for the first time since being traded to Cleveland in July 2009 for Victor Martinez. "It was great," he said. "I was hoping it would be a little bit better, but it was just good. The fans here are just incredible."

TRAINER'S ROOM

Nationals: LF Jayson Werth played his second straight game after being activated from the DL following right shoulder surgery in January. He batted second, went 0 for 4 and is 0 for 7 this year.

Red Sox: SS Xander Bogaerts missed the game with a sore right knee. Farrell said he might be able to play in Wednesday's series finale. RHP Brandon Workman visited orthopedist Dr. James Andrews to check on his right elbow. Workman has been with Triple-A Pawtucket this season after going 1-10 with a 5.17 ERA last season in 19 games for Boston.

UP NEXT

Gio Gonzalez (0-1) faces Wade Miley (0-0) in the finale of the three-game series. They last faced each other on Aug. 21 when Miley was with Arizona. Neither allowed a run — Gonzalez in seven innings, Miley in 6 2-3 — before Washington won in the bottom of the ninth when an error allowed the game's only run to score. It was Washington's 10th consecutive win.