WASHINGTON — Nationals pitcher Stephen Strasburg has spent time on the disabled list during each of the past three seasons.

The Nats are hoping he doesn’t make it four in a row.

Strasberg exited after two innings because of tightness in his right shoulder, and the San Francisco Giants rapped eight extra-base hits to beat Washington 9-5 Friday night.

“His shoulder tightened up on him. He’s got a little bit of inflammation,” manager Dave Martinez said. “He’s getting an MRI tomorrow, so we’ll know a lot more.”

Strasburg said he’s been dealing with the issue prior to Friday.

“You’re not going to feel 100 percent every time, but I think it’s just been something that’s been a gradual process and it’s been affecting me more and more over the last three or four starts,” Strasburg said, “and it’s a tough one to gauge because you want to go out there and do your part.”

“Today it acted up on me a little bit more than the other ones and Davey decided to pull the plug,” he said.

The 29-year-old Strasburg has been excellent when healthy, going 15-4 in both of the two past season. But he hasn’t made 30 starts in a year since 2014 when he made 34.

Strasburg has made five trips to the disabled list since 2015.

Neither Martinez or Strasburg were forecasting the MRI result.

“Hopefully, it’s nothing at all,” Martinez said. “Just a little tightness, a little inflammation, we can take care of it and then we’ll go from there.”

Strasburg (6-6) gave up three runs and five hits.

Andrew McCutchen and Gorkys Hernandez homered for San Francisco, which collected 15 hits, including two doubles by Brandon Crawford.

The Giants squandered most of an early 5-0 lead and led 6-5 before Pablo Sandoval, pinch-hitter Evan Longoria and Hunter Pence drove in runs in the seventh.

“Anything can happen in a one-run game,” Giants manager Bruce Bochy said. “It’s always nice to have a cushion and the guys gave us that and it allows you to do some things.”

McCutchen’s solo home run in the first inning was his third in five games and he later singled. He entered the game 3 for 22 against Strasburg.

Reyes Moronta (2-0) got two outs for the win.