The Philadelphia Eagles went more than two months without a win, and even then they had to wait a few anxious minutes more to be sure they had ended the team's longest losing streak in 42 years.
Nick Foles threw a 1-yard touchdown pass to Jeremy Maclin as time expired Sunday, but a 23-21 victory over the Tampa Bay Buccaneers remained in doubt until the instant replay official upheld the catch that the jubilant receiver made as he went to his knees in the side of the end zone.
"Nick put the ball down and away like he was supposed to, I went down and got the ball, made sure I was in bounds, and the rest is history," Maclin said.
So is the eight-game skid that's assured the Eagles (4-9) of finishing with a losing record for only the third time in 14 years under coach Andy Reid.
Foles threw for two touchdowns in the final four minutes to overcome an 11-point deficit, finishing with an Eagles' rookie-record 32 completions and 381 yards. He was sacked six times, but withstood the punishment to also lead Philadelphia in rushing with three carries for 27 yards and a touchdown that helped build a 10-0 halftime lead.
"Very special. Very humbling," Foles said of his first victory as an NFL starter. "It's a great win, too, because we came back. We were winning, then we lost the lead. Guys stuck together."
And rallied around Foles, who attempted 51 passes in his fourth start in place of the injured Michael Vick, mainly because Tampa Bay completely shut down the Eagles running game.
Bryce Brown, filling in for the injured LeSean McCoy, was held to 6 yards on 12 carries after rushing for 347 yards against Carolina and Dallas the previous two weeks.
Foles threw an 11-yard TD pass to Clay Harbor with 3:55 remaining, then led the Eagles on a 64-yard game-winning drive after the Philadelphia defense forced a punt by Tampa Bay.
The third-round draft pick from Arizona set up the winning touchdown with a 22-yard completion to Jason Avant on fourth-and-5 to the Bucs 1. The Eagles scrambled up to the line and Foles spiked the ball, stopping the clock with 2 seconds left and giving himself a chance for one more play.
The 6-foot-6 Foles rolled to his right and found Maclin open in the side on the end zone, where the receiver made the catch going to his knees before being pushed out of bounds by cornerback Leonard Johnson.
"All around as a team, we just never quit. You guys are seeing Nick Foles grow into a phenomenal quarterback reight in front of your eyes," Maclin said. "I think the sky's the limit for him."
Rookie Doug Martin rushed for 128 yards and Josh Freeman shrugged off a slow start to throw for two second-half touchdowns to help Tampa Bay overcome its 10-point halftime deficit to go up 21-10 on Martin's 4-yard TD run midway through the fourth quarter.
That's when Foles, who scored on a 10-yard run in the first half, took charge.
The Eagles drove 72 yards in eight plays to Harbor's TD. Foles threw incomplete on a 2-point conversion that would have enabled his team to pull within 3 points, meaning Philadelphia needed a TD when the offense got the ball back with no timeouts and less than three minutes remaining.
Foles kept the final drive alive with a 3-yard run on fourth-and-1 from the Tampa Bay 31. It looked as though the Bucs might hang on before the rookie moved around to buy some time and threw 22 yards to Avant cutting across the middle to keep the Eagles' hopes live. Avant had seven receptions for 133 yards.
"They're gutty. That's what they are," Reid said, adding that Foles requested to run the play that produced the winning TD. "Some of the starters made big plays, and then the backups jumped on the bandwagon and joined them. ... I'm proud of the whole bunch."
Martin put together the fourth 100-yard game of his career on 28 carries. Freeman threw TD passes of 1 yard to Mike Williams and 13 yards to Vincent Jackson, who finished with six receptions for 131 yards.
The Bucs (6-7), who honored the franchise's only Super Bowl championship team at halftime, lost for the third straight week since using a four-game winning streak to climb into playoff contention.
The Eagles won for the first time since beating the New York Giants 19-17 on Sept. 30. They played a solid first half, but helped the Bucs get back in the game with their only turnover early in the third quarter.
Punt returner Damaris Johnson muffed a fair catch, and Tampa Bay's Dekoda Watson recovered at the Eagles 5 to set up Freeman's first touchdown pass.
"Any time we lose, it's frustrating, no matter what the reason is," said Freeman, who was 14 of 34 for 189 yards and no interceptions. "Philly just found a way to make more plays than us. Whether it was at the beginning of the game or down the stretch, it doesn't matter."
NOTES: Eagles CB Nnamdi Asomugha was shaken up early in the second quarter when he took a hard fall on a near interceptions. X-rays on his neck were negative and he returned to the game. ... The Bucs limited the Eagles to 29 yards rushing on 16 attempts. ... All four of Philadelphia's wins have been two or fewer points.
Online: http://pro32.ap.org/poll and http://twitter.com/AP_NFL