A flurry of trade-deadline moves on Thursday night included Washington Nationals All-Star outfielder Kyle Schwarber, who was dealt to the Boston Red Sox for a highly touted pitching prospect.

Schwarber, a former Indiana University star who spent five-plus seasons with the Chicago Cubs before signing a one-year deal $10-million deal with Washington in the offseason, joins a Red Sox team that leads the American League East, but is in a tight race with the Tampa Bay Rays with the New York Yankees and Toronto Blue Jays still wanting to join the race in the final two months.

Schwarber, 28, had a record-setting June for the Nationals, hitting 16 home runs in 18 days, but then injured his hamstring on July 3 and has missed the last three-plus weeks. He is expected back in early August, but no firm date is in place. 

Schwarber is batting .253 with 25 home runs and 53 RBIs this year, his first as an All-Star. He wasn't able to play because of the injury. Schwarber's contract includes an $11.5 option for 2022 that includes a $3 million buyout. The Red Sox are paying the balance of Schwarber's 2021 deal.

The Nationals are getting minor league right-handed pitcher Aldo Ramirez in return for Schwarber. Ramirez, 20, had a 2.03 ERA in eight games for Class A Salem. He is on the seven-day injured list.

The Red Sox are currently 63-41 and have a 1.5-game lead over Tampa Bay in the AL East. The two teams are meeting in a huge three-game series in St. Petersburg this weekend.

“I don’t think we’re panicking yet. We’re not hoping to get a Joey Gallo-type megadeal. I don’t think that’s something we’re expecting, to be honest, because our team is pretty solid,” Xander Bogaerts told the Boston Globe on Thursday. “But there’s obviously room for improvement. If [the front office feels] we can get better, then pull the trigger on that.

“The playoffs don’t come around a lot. We’re in a really good position — we’re in first place right now. The division is very close. Hopefully we do something, get that sense that we want to be better,” he added. “No one expected us to be here. I’m definitely sure we surprised ourselves, to be honest. From last year to where we are now, not a lot of people thought we would be in this position. [But] once you’re in this position, we’ve got to fully take advantage of it. If there’s any way to upgrade your team, why not?”

Schwarber hit 12 homers in a 10-game span from June 19-29, tied for the big league record for most homers in a 10-game period. He also set a record for most homers as a leadoff hitter in a calendar month with 15. He had helped the Nationals get back in the NL East race, but since his injury, they have fallen 7.5 games behind the New York Mets after going just 7-17 in July.