BALTIMORE – Carson Wentz dived past an incoming defender for a touchdown, stood and raised his arms for a few seconds of celebration, and then stopped. He looked toward the sideline. He wanted to know if the Eagles would kick an extra point or attempt a two-point conversion.

Wentz led the Eagles on a dramatic, potential game-tying drive in Sunday's 27-26 loss to the Baltimore Ravens, finally finishing with a touchdown after failing in five similar opportunities this season. But instead of it being a game-tying score with the Eagles down seven points, coach Doug Pederson wanted to make it a game-winning score. He passed on the extra point and went for two.

"I wanted to win the football game," Pederson said.

The Eagles haven't won a game in more than a month and are not going to the playoffs. Pederson wasn't thinking overtime. He ended the game on the play — just not the way he hoped.

Wentz's pass intended for Jordan Matthews was tipped at the line and fell incomplete, giving the Eagles their fifth consecutive loss. Now 5-9, they will have back-to-back losing seasons for the first time since 1998-99.

The failed two-point conversion and final result overshadowed what else happened on Sunday: Wentz leading the Eagles back from a 10-point deficit in the fourth quarter, the Eagles running effectively against the NFL's top-ranked rushing defense, and linebacker Jordan Hicks making a game-altering interception. Those would all matter more if the result had been different. Instead, it was the missed conversion that left a final bitter taste in a locker room too used to defeat.

"Everybody is dejected," Pederson said. "That's been the feeling the last couple of weeks."

Wentz finished 22 of 42 for 170 yards and one interception, along with 8 rushing yards and a touchdown. Ryan Mathews rushed 20 times for a season-best 128 yards and one touchdown. Zach Ertz led the pass catchers with six receptions for 80 yards.

Wentz's interception came on his first pass. It was his fifth consecutive game with an interception and his eighth overall in that span. He rebounded to avoid a turnover the rest of the afternoon. The Eagles stayed within one possession until Ravens running back Kenneth Dixon rushed for a 16-yard score with 11 minutes, 6 seconds remaining in the fourth quarter.

An Eagles loss appeared likely when they failed to convert on fourth and 2 from the Ravens' 34-yard line on the ensuing drive. Pederson elected to run Nelson Agholor on an end around instead of plow forward with Mathews, who had success rushing downhill most of the game.

Baltimore needed to wind down the final eight minutes of the clock, or even add to the lead. The Ravens drove to the 11-yard line when offensive coordinator Marty Mornhinweg, a former Eagles assistant, called a passing play. Joe Flacco's attempt was intercepted by Jordan Hicks, who said he saw Flacco eyeing the receiver.

"We needed a play," Hicks said. "That was do-or-die."

Ravens coach John Harbaugh was unhappy with the play call, calling it the "all-time worst call ever" and adding that he should have vetoed it.

With new life, the Eagles got a 29-yard field goal by Caleb Sturgis to make it a seven-point game, and then forced Baltimore to punt. Wentz entered the huddle with 99 seconds remaining at the Eagles' 41-yard line and a seven-point deficit. The Eagles came up short in similar situations in losses to Detroit, Dallas, New York, and twice against Washington. They beat Atlanta with a fourth-quarter comeback, but the go-ahead score came with nearly seven minutes remaining.

Wentz completed three of six passes, including a 24-yarder to Ertz, to bring the ball into the red zone. Agholor drew a pass-interference at the 4-yard line to get the Eagles within striking distance.

With 12 seconds remaining, Wentz spun away from pressure and scrambled to his left. He saw an opening to the end zone, with only safety Eric Weddle in his way. Wentz sprinted forward, cut inside, and dove forward as Weddle tried for the tackle.

"I knew contact was coming," Wentz said. "I knew I had to find a way to get in."

Pederson said the play showed "everything that we've talked about" with Wentz, including "sheer determination" and "mental and physical toughness." The sideline erupted with a sense of satisfaction that had eluded the Eagles so many times before.

"We've had a lot opportunities to win the football games as a team and didn't get it done," Ertz said. "We finally scored in a two-minute situation at the end of the game against a really good defense. Finally put it together. And then had all the confidence in the world that we would score on the two-point play."

Pederson trusted his offense and said the team's internal data suggested the Eagles had less than a 50 percent chance of winning in overtime. Wentz said he "loved" the decision to go for two. Veteran left tackle Jason Peters said he liked it, adding that the line was so "hyped" it didn't even come off the field while the coaches made the decision.

The Eagles were in shotgun with three wide receivers, Ertz, and running back Byron Marshall. They kept Mathews on the sideline even though he rushed for a two-point conversion earlier in the game. Pederson expected the zero-blitz that the Ravens ran, and called the play he wanted for that defensive look. It was a quick pass across the middle to Matthews. But before the ball reached Matthews, Ravens linebacker C.J. Mosley tipped the pass and rerouted it to drop short of the receiver.

"We had an opportunity there, one of our staple plays we run against that coverage," Pederson said. "…The play call, the play design, everything was built for that coverage. Credit them — they got a hand up and tipped the ball."

Pederson would have been lauded for his aggressiveness if the play had been successful. Sunday would have been remembered as a signature victory for Wentz. Instead, it was another loss in a season full of them.

"There's always a few plays that decide the game," Wentz said. "This one just happened to be the final one. It's tough, without a doubt, but it was good to see us finally get down there and finish a drive off."