Trevor Booker attacks the rim with the Lakers’ Pau Gasol in hot pursuit in the first half at Staples Center. Booker (10 points) was one of seven Wizards in double figures. (Mark J. Terrill/Associated Press)

The Washington Wizards’ 117-107 victory over the Los Angeles Lakers was pretty much secured when Trevor Ariza tracked a rebound in front of his bench and handed the ball off to John Wall — but the fireworks were just about to begin. Before Wall could even start up the court, tempers flared after Drew Gooden got tangled with former Wizard Nick Young and ripped through his arm, leading to some pushing, shoving, unnecessary grasping and overall confusion at Staples Center.

The late skirmish — which resulted in Gooden’s ejection and technical fouls for both Young and Lakers backup forward Jordan Hill — marred a win that secured Washington’s first two-game sweep of the Lakers since 2004-05, the last time the storied franchise missed the playoffs.

“Pretty strange, but I guess you got to prepare for anything. Luckily, it didn’t get out of hand,” Ariza said after the Wizards improved to 36-33 and stayed a game behind Brooklyn for fifth place in the Eastern Conference.

With the Wizards leading by 10 points with 2 minutes 14 seconds remaining, Young drove inside and missed a short jumper and got tied with Gooden. Gooden yanked away, fell on his backside and Young rushed to shove him in the neck. As Marcin Gortat attempted to separate them, Hill ran into Gortat and started wrestling with him until he stopped and held him in an embrace. Gortat didn’t retaliate, but didn’t understand why the incident had to escalate so quickly.

“I was protecting my man, Drew Gooden,” Gortat said. “Whatever happened after that is all fake.”

Before the game, Coach Randy Wittman urged his players to “get dirtier,” which implied playing with more heart, not getting tossed ejected. And for much of the game, the Wizards responded by moving the ball, being aggressive and taking advantage of a Lakers team that is on pace to finish with the franchise’s worst record since it moved to Los Angeles in 1960.

With his mother, Frances Pulley, on hand to watch, Wall scored a game-high 28 points and added 14 assists as the Wizards had seven different players score in double figures.

“It’s Staples Center. The lights get dark, the celebrities out there, it’s a good crowd. I just enjoy playing in L.A.,” said Wall. “We didn’t start the trip off the way we wanted to, 0-2, but we got 13 games left. We got to try to win them all. We got to try to get a better seed and go out and compete and find our way to get homecourt advantage. We can’t let games slip away.”

Gortat missed the Wizards’ loss in Portland after straining his already sore back in pre-game warmups. Though he could barely sit down without grimacing and bracing himself, Gortat said he would do everything within his power to play against the Lakers.

About 90 minutes before tip-off, Gortat did some stretching exercises in the middle of the locker room and then went through his warm-ups without any complications.

Gortat didn’t have the best shooting night, but his presence made a huge difference on both ends of the floor. He finished with 13 points and 13 rebounds, helping to thwart a late run when he took a pass from Wall and dunked, then blocked a shot by Lakers guard Jodie Meeks (21 points).

“I still felt a little stiffness but then, when I get warmed up, I start feeling better and my agility and movement was perfect,” Gortat said.

Before exiting, Gooden had his first double-double (11 points, 11 rebounds) as a member of the Wizards, scoring at least 10 points for the fourth straight game and seventh time in the past nine games.

Bradley Beal wasn’t worried about starting this road trip with two off-target shooting nights in Sacramento and Portland. Wall found Beal wide open for three three-pointers in the first period, when Wall handed out nine assists. Beal finished with 18 points..

Backup forward Al Harrington went scoreless and missed all five of his shot attempts in a six-minute stint in Portland, but he came out much more aggressively. The 15-year veteran put the ball on the floor and drove through the Lakers’ porous defense for easy layups and knocked down open jumpers when they came his way. Harrington finished with 15 points, the most since he returned from right knee surgery last month and just short of his season high.

The Wizards have had difficulty closing out quarters on this road trip, blowing a five-point lead with 24.3 seconds in regulation while losing in overtime to Sacramento and surrendering an 8-0 run to Portland in 97 seconds, turning a six-point lead to a two-point halftime deficit from which they never recovered.

Trevor Booker (10 points) gave the Wizards a 21-point lead with 7:22 left in the third quarter when he made a difficult running jumper over his cousin, Hill (nine points, 14 rebounds). Booker then celebrated with a little hop step after also drawing a foul, but the Wizards were unable to keep the struggling Lakers down for long.

Wall picked off Nash and took off up the floor, sprinting past Young and Xavier Henry and gently dropping the ball through the net as he got fouled. He then made the free throw to give the Wizards a 19-point lead with about three minutes remaining in the quarter but Young, who returned after missing more than a month with a sore left knee, made a three-pointer to start a 16-4 run to get within seven points entering the fourth quarter.

“We shouldn’t have let it come to the way it did,” Wittman said. “Turning the ball over [all over] the place and we come down the stretch, I’d rather them run 24 seconds off the clock, have a violation and had the ball to the ref than to throw it away. They’re [opponents] are getting layups; they’re getting threes. Just got to do a better job of that, but this is a big win for us. Coming off the tough loss in Sacramento and Portland, to get us a win on the second night of a back to back is big for us. It was unfortunate, the altercation at the end.”