LANDOVER, Md. (AP) — The Washington Football Team played like a group of guys determined to make a name for themselves.

Peyton Barber ran for two touchdowns and Dwayne Haskins rallied Washington from a 17-point deficit to beat the Philadelphia Eagles 27-17 Sunday in coach Ron Rivera’s debut.

Haskins jumped in to give his teammates a halftime speech because Rivera was getting a pre-planned IV in his first game since learning he has a form of skin cancer.

“When playing quarterback, I’ve learned over the years that there’s opportunities in a game or in the locker room before the game to fire guys up,” said Haskins, who was 17 of 31 for 178 yards and one TD. “I thought we were kind of in a lull. ... Trying to find a way to motivate the guys and we found a way to come back in the second half and win.”

After falling behind 17-0 following a pair of touchdown passes by Carson Wentz, Washington relied on a punishing defense and opportunistic offense in its first game since owner Dan Snyder finally agreed to change the team’s name and former employees alleged sexual harassment within the organization.

Rivera lived up to his “Riverboat Ron” nickname earned in nine seasons with Carolina. Rivera went for it on fourth-and-1 from the Eagles 5 with the score tied midway through the fourth quarter.

Barber ran for the first down and then scored from the 3 to give Washington a 24-17 lead.

“I did that because I wanted the guys to make sure they understood that I believed in them,” Rivera said about going for it. “My first couple years as a head coach I made that mistake, not showing the team early enough that I believed in them, so it took us a little bit longer. I want these guys to know I believe in them, I believe that we could get that first down, and they did.”

Zach Ertz dropped a pass on fourth-and-3 from the Eagles 42 on the ensuing drive and Dustin Hopkins kicked a 40-yard field goal to make it 27-17.

Wentz was sacked eight times and threw two costly interceptions behind an injury-depleted offense line featuring two guys — right tackle Jack Driscoll and right guard Nate Herbig — starting their first career games.

“We can’t have the mistakes, we can’t have the sacks, we can’t have the turnovers and expect to win, especially against a division opponent,” Eagles coach Doug Pederson said.

Wentz’s pass for Jalen Reagor late in the second quarter was underthrown and picked by Fabian Moreau at the Philadelphia 45. Haskins then connected on four straight passes after starting 3 of 12. He hit Logan Thomas for a 6-yard TD toss to cut the deficit to 17-7.

Then, Jimmy Moreland stepped in front of Wentz’s pass to John Hightower and returned it 32 yards to the Eagles 20. Barber needed two tries from the 1 before running in for a score that cut it to 17-14.

After Washington’s fifth sack pushed Philadelphia back, Jake Elliott was short on a 53-yard field goal.

The Eagles went for it on a fourth-and-4 from the Washington 45, but Jon Bostic sacked Wentz on a blitz up the middle. That turned into a 38-yard field goal by Hopkins that tied it at 17 early in the fourth quarter.

Washington’s defensive line had its way against Philadelphia’s depleted line, missing three-time Pro Bowl right tackle Lane Johnson and three-time Pro Bowl right guard Brandon Brooks. Ryan Kerrigan led the way with two sacks and No. 2 overall pick Chase Young got one.

“We expected to come out and make plays,” Kerrigan said. “We got a lot of productive dudes in this room and I was glad we were able to showcase that a little bit today.”

Wentz threw a 6-yard TD pass to Ertz and a perfect 34-yard toss to Dallas Goedert in the first half.

“I put our defense in a bad spot a couple occasions,” said Wentz, who finished 24 of 42 for 270 yards. “I gotta be better. I’ll own that.”

STATS AND STUFF

Wentz threw his first interceptions in 191 attempts, going back to last Dec. 1. ... Eagles rookie WR Jalen Reagor made a 55-yard, over-the-shoulder catch for his first career reception on third-and-22... Eagles DT T.Y. McGill shared a sack with Vinny Curry. His last sack came in 2016 with the Colts. ... Kerrigan set a franchise record with his 92nd career sack, passing Dexter Manley.

SOCIAL JUSTICE

Both teams lined up on the field and locked arms in a sign of unity about 30 minutes before kickoff while Alicia Keyes performed “Lift Every Voice and Sing” in a video designed to address racial inequality.

The Eagles left the field afterward while Washington players went to the sideline and took a knee for a moment of silence.

The Eagles were not on the field for “The Star-Spangled Banner” while Washington players stood on the sideline. A few players raised their fists.

INJURIES

Eagles: Johnson (ankle), RB Miles Sanders (hamstring) DE Derek Barnett (hamstring) and DT Javon Hargrave (pectoral, hamstring) were among the inactive starters. ... Curry (hamstring) left in the fourth quarter. ... DE Brandon Graham was evaluated for a head injury. ... Driscoll left in the fourth quarter.

Washington: LB Cole Holcomb (knee) left in the second quarter before returning in the second half.

UP NEXT

The Eagles host the Los Angeles Rams and Washington visits Arizona.

More From 97.3 ESPN