EAST RUTHERFORD, N.J. — Benching the quarterback was just the start. As his team began a crucial five-game stretch that could determine the division, Ron Rivera shuffled his offensive line, retooled his secondary and sent a strong message to his linebackers that he wanted more.

To get anywhere, Rivera knew, the Washington Football Team had to get out of New Jersey with a victory over the New York Giants, its NFC East rivals who entered the game without a win.

Washington came close Sunday — but not close enough, falling to the Giants, 20-19, in the final seconds of an up-and-down game that ultimately hinged on a pair of turnovers and a decision by Rivera in the last minute to attempt a two-point conversion that his offense failed to convert.

Quarterback Kyle Allen, having just completed a 22-yard touchdown pass to wide receiver Cam Sims that narrowed New York’s lead to one point late in the fourth quarter, scrambled but was unable to find an open receiver on the attempt. His pass landed in the end zone without a Washington receiver around.

The loss dropped Washington to the bottom of the division at 1-5 (tied with New York) and left its coach livid.

“Yeah, it’s going to bug me because we lost, and it really does, it pisses me off,” Rivera told reporters in a postgame video conference. “I want to win football games. I don’t care if this is my first year; I don’t care that we have a group of young guys that have to learn. We’re trying to teach them, we’re going to teach them, and they’re going to learn how to win. And at the end of the day, that’s what we’re here for.”

The decision came as no surprise to the players, who knew of Rivera’s history of making bold decisions, which earned him the nickname “Riverboat Ron” during his time with the Carolina Panthers.

Yet for much of the first half, the decisions Rivera made in the lead-up to the game seemed to have little impact as Washington’s issues spread to every phase. A missed field goal ended Washington’s first drive, and an interception cut short its second. Rookie Saahdiq Charles was lost to a knee injury just two snaps into his starting debut at left guard, and Allen, in only his second start for Washington, took three sacks, one he could have avoided instead of taking a 14-yard loss. The defense allowed scores on the Giants’ first three drives.

For nearly 29 minutes to start Sunday’s game at MetLife Stadium, Washington was a disaster growing more disastrous by the second, with missed tackles, curious plays and the general appearance of a team wholly unprepared to face even an 0-5 opponent.

But Washington’s landslide stopped in the final two minutes of the first half, when Tress Way, punting on a fourth and nine from the New York 45-yard line, was hit by a Giants player, giving Washington a free five yards and a chance to redo its fourth-down attempt.

“I thought because we had moved the ball pretty well and we didn’t have enough to show for it,” Rivera said of his decision to go for it. “So I thought, again, that we could get the first down. I wanted to get the first down because I wanted to put points up on the board before the half.”

Allen rewarded his coach’s confidence, connecting with Dontrelle Inman for a 15-yard completion to convert. Short passes to running back J.D. McKissic and wide receiver Terry McLaurin moved Washington into the red zone before the Giants defense gave it a gift: a holding penalty that bumped the offense to the 5-yard line.

With only 17 seconds remaining in the half, Allen, while falling backward under pressure, threw a perfect ball to tight end Logan Thomas in the back corner of the end zone. Thomas dragged both feet to stay in bounds while securing the catch over his shoulder, bringing Washington within three points at the break.

“We had been working on that all week,” Allen said. “It was a matchup deal. We got him outside … on I think a safety. I believe Logan can do that stuff all the time. He’s kind of like a rebounder, so we wanted to give him a chance. … I just tried to give him a ball he could go up and get, and he made a hell of a play.”

The second half began with a scary moment, when New York wide receiver C.J. Board was knocked out after a hit and lay flat on his back as trainers rushed to his side. His face mask was removed as more than a dozen doctors and trainers tried to keep him stable before carting him off. Board suffered a concussion and sprained neck on the play and was taken to a hospital for further evaluation, the Giants announced later in the game.

When play resumed, Washington’s defense took the lead in guiding its comeback, thwarting the Giants’ drive with a tackle for a loss on a third down that forced a punt and then, after a three-and-out by Washington’s offense, grabbing a takeaway to prevent what could have led to a two-score deficit for Washington.

One play after being flagged for pass interference, defensive back Kendall Fuller made a diving interception off Giants quarterback Daniel Jones in the back of the end zone to end a 14-play drive that had taken more than nine minutes off the clock. It was his fourth pick of the season, matching a career high.

“I was actually kind of just looking at the ball about to let it go until I heard [Deshazor Everett] say, ‘Go get it, go get it,’ ” Fuller said.

Fuller’s interception sparked a 14-play, 70-yard drive by Washington that spanned nearly seven minutes and spilled into the fourth quarter. The team picked up five first downs along the way, setting up the game-tying 28-yard field goal by Dustin Hopkins.

After Washington’s defense again forced the Giants to punt, the ball was back in Allen’s hands for a chance to lead Washington on a go-ahead scoring drive with about seven minutes remaining. Instead, he was strip-sacked on third and nine, and the ball was recovered by Giants linebacker Tae Crowder, who ran it back 43 yards for the touchdown.

Allen responded, leading Washington on a final 10-play, 75-yard drive that he capped with the 22-yard touchdown pass to Sims. Allen finished 31 for 42 for 280 yards with the two touchdowns — enough to retain his starting job for another week, Rivera said, despite his two turnovers.

But as Rivera reiterated to his players after the game, he came to win, not to tie. So he spurned the extra-point attempt after Allen’s last touchdown, tried for two instead and, after the attempt failed, watched the final seconds tick off the clock before Washington fell to the bottom of the NFC East.

“It’ll eat at me because we lost,” Rivera said. “I want to win. . . . I’m trying to get our players to understand that this is how we’re going to do things. We’re going to do things to the max. We’re going to play to win football games.”

Allen seemed to reiterate his coach’s sentiment.

“We need to clean up the mistakes, and we need to do this and that, and we’re working through a lot of things. But I’m proud of the way we fought,” Allen said. “I think that’s a mentality that we’re starting to build around here and that’s starting to become part of who we are.”