WASHINGTON (AP) — Juan Soto snapped a 15-game home run drought with a two-run shot, Tanner Rainey got the final five outs and the Washington Nationals held off the Colorado Rockies 6-5 Sunday.

Soto added a double and a walk for the Nationals, who took three of four from the Rockies to win their first series at home. Lane Thomas had a two-run homer.

”I’ve been swinging the bat pretty well the last few days,” Soto said after going 2 for 3. ”I’ve been doing my homework, working on my swing, working on my stance and everything. Just feel great.”

Rockies starter Kyle Freeland (1-5) exited with a foot injury with two outs in the sixth inning. He landed awkwardly on his 107th pitch and was helped off the field. Freeland was charged with five runs on seven hits. He walked four and struck out two.

”On push off, just felt a shooting pain at the top of my foot right at the joint kind of going down my foot,” Freeland said. ”I have no idea what it was. I’ve never had it before, but it was good that X-rays came back negative. We think it was just a little bit of impingement there, so we’ll see how I feel tomorrow.”

Manager Bud Black didn’t think Freeland will need to go on the injured list.

After pulling within 6-3 in the seventh, the Rockies got RBI singles from Brendan Rodgers and Sam Hilliard with one out in the eighth against Kyle Finnegan. With runners on first and third, Nationals closer Rainey struck out Elias Diaz and Charlie Blackmon.

”Obviously, it’s the tying run there (at third). Can’t give it up. At least do your best not to,” Rainey said. ”Knew we needed either a hard ground ball for the double play with the first guy or a strikeout. Ended up getting the strikeout, so that gives you a little more leeway.”

Rainey finished with a 1-2-3 ninth for his fifth save.

Nationals starter Josiah Gray (5-4) worked around three hits and four walks to allow one run over five innings.

Blackmon led off the game with his seventh homer for the Rockies, who finished their road trip 2-5 and are 7-15 away from home this season. Rodgers went 2 for 4 to extend his hitting streak to 16 games, matching his career high.

”The way we came back, got some opposite-field hits, put the ball in play, that would have been a nice one,” Black said.

Soto hadn’t homered since May 12 against the Mets. He gave Washington a 2-1 lead when he hit his ninth of the season, a line drive to center in the bottom of the first. He raised his average to .236.

”When he starts hitting the ball out of the ballpark, it’s going to come in bunches,” manager Dave Martinez said before the game.

Thomas hit a two-run homer in the sixth to make it 6-1.