Michael Morse hits a grand slam in the top of the 11th inning to propel the Nats to victory. (Paul Connors/Associated Press)

So much had happened by the time Michael Morse walked into the batter’s box at Chase Field late Sunday afternoon. The managers and two pitchers, including one working on a shutout, had been ejected. The Washington Nationals had built a four-run lead. The Arizona Diamondbacks had erased a three-run deficit in the ninth against an imploding closer. The Nationals had taken the lead back in the 11th inning when Rick Ankiel stepped into the batter’s box, dug in and stood still.

Morse then provided the most emphatic moment of a game stuffed with turning points and plot twists. After Ankiel’s bases loaded walk gave the Nationals the lead, Morse’s 11th-inning grand slam off reliever Joe Paterson sealed the Nationals’ 9-4 victory over the Diamondbacks, a wild end befitting a wild game. It earned the Nationals a series split to begin their 11-game Western trip.

“It felt great to get the win after that game,” Morse said. “All of us, everybody that was in that game, played hard all the way up to the last out. It was a battle out there. Both teams wanted to win bad. To get the win, come out on top, it’s great.”

About 10 minutes after it finally ended, as music blared in the Nationals’ clubhouse and they packed for San Francisco, players were still exchanging fist pounds and high-fives. There were congratulations to go around.

Starter Jason Marquis threw 51 / 3 scoreless innings before he hit Justin Upton and was ejected. Tyler Clippard faced eight batters and struck out six. Sean Burnett helped bail out Drew Storen, stranding the winning run in the ninth inning and throwing a scoreless 10th. Wilson Ramos blasted a three-run homer seven innings after he fouled a ball off his shin.

Five Nationals were hit by a pitch, a team record, and Jayson Werth was hit for the third time in the series. Twice, the dugouts nearly emptied. Emotion flowed. Ramos hit his homer in the eighth, giving the Nationals a 4-0 lead, and took a 30-second jog around the bases. Diamondbacks players and coaches screamed at him from their dugout. Manager Jim Riggleman suggested Ramos’s bruised shin slowed him.

“I didn’t feel bad at all,” Ramos said. “I wanted to see those guys angry.”

And so if the Nationals had not been able to recover from blowing a four-run lead, “it would have been a tough one to swallow,” Burnett said. “But we’re not really worried about the other outcome.”

In the 11th, Paterson pitched around Werth with two outs and runners on the corners, choosing to pitch to Ankiel with the bases loaded instead. Ankiel walked to the plate “just looking for a pitch to hit,” he said. “Like any other at-bat, really.”

When Paterson fired a ball to make it 3-1, Ankiel still wanted to hit, was still “looking for one to drive,” he said. But Paterson missed again, and Ankiel had the discipline to take the walk. Jerry Hairston, who led off with a single, scored the go-ahead run.

Up came Morse. The night before, he had struck out three times, stranding a runner in scoring position each time. He arrived at the park Sunday hoping for another clutch opportunity.

“That’s one thing I don’t do, is let somebody take me out of my game,” Morse said. “I sat there and I told myself, ‘Slow the game down, and get a good pitch to hit.’ ”

This time, he lashed a 2-1, 85-mph fastball high over the center field fence. He pumped his fist once as it bounded off the wall beyond the fence, then again as he rounded second.

The heroics wouldn’t have been necessary, but “I just gave everybody a little extra work,” Storen said. He faced five batters and allowed four of them to reach. He walked the last two hitters he faced, including a four-pitch walk to Juan Miranda. Bench coach John McLaren removed him.

“I don’t ever want to be taken out,” Storen said. “I wanted it, but you know what? That’s probably the right move.”

Todd Coffey and Burnett limited the damage enough to take the game to extra innings. By then, the bad blood had settled.

In the fifth inning, Ian Kennedy hit Werth in the shoulder with a first-pitch, 91-mph fastball. Werth took an angry step toward the mound, glared at Kennedy and flicked his bat toward the Nationals’ dugout before walking to first.

Home plate umpire Rob Drake issued warnings to both dugouts, which drew protest from Riggleman. Two batters later, Kennedy grazed Morse with a pitch, but Drake allowed Kennedy to stay in the game.

Marquis retired the Diamondbacks in order in the fifth, and in the sixth, with one out and a runner on first, Upton came to the plate. With the first pitch, Marquis fired a sinker inside that bored into Upton’s midsection. Upton crumpled in the batter’s box, and Marquis punched the air, as if mad at himself.

“Why would I want to put the winning run on base?” Marquis said. He also insisted he typically has trouble gripping his sinker when he pitches in Arizona’s dry air.

Drake immediately tossed Marquis. Marquis pointed at the scoreboard and yelled at Drake. “It’s a one-run game!” he said. “Are you kidding me?” Riggleman argued, too. But Marquis’s day was over, Riggleman ejected with him.

“I can promise as surely as I’m sitting here, we did not one time have any intent to hit Upton,” Riggleman said. “I feel terrible he got hit four times [in the series], because every time, it was hurting our chances to win the ballgame. Clearly, we feel that when there was an open base, they took some shots at Werth. We didn’t like that, but warnings are given. We’re not throwing at anybody.”

In the eighth, Arizona reliever Esmerling Vasquez drilled Danny Espinosa — who leads the National League in being hit by pitches — with a 95-mph fastball. Espinosa yelled out to the mound and had to be held back by Drake. Livan Hernandez and Werth stepped out of the dugout.

When the dust settled, Vasquez and Arizona Manager Kirk Gibson were ejected. When Ramos destroyed a line drive over the left field fence, the first player to greet Ramos after his slow trot, on the top step of the dugout, was Werth.

At various points during the rest of the game, Werth, along with the rest of his teammates, found himself on the verge of confrontation. By earning a series split, they struck the most satisfying blow.

“We need to win that game,” Werth said. “And we did.”