First-and-goal at the 1, trailing by five points with 2 seconds remaining.
Nick Foles walked over to the sideline during a time out to discuss Philadelphia's options with coach Andy Reid, confident he had the right play in mind to stop the Eagles' longest losing streak in 42 years.
"He called it, he wanted it, and he executed it," Reid said Sunday after Foles threw a 1-yard touchdown pass to Jeremy Maclin as time expired to snap an eight-game skid with a 23-21 victory over the Tampa Bay Buccaneers. "He did a great job with it, so hats off to him."
Foles threw for a pair of TDs in the final four minutes to overcome an 11-point deficit and give Philadelphia (4-9) its first win since Sept. 30. The Eagles have come from behind in all four of their victories, and their four wins by two or fewer points are a team record.
The third-round draft pick completed 32 of 51 passes for an Eagles rookie-record 381 yards and no interceptions. He was sacked six times, but withstood the punishment to also lead Philadelphia in rushing with three carries for 27 yards and a first-half touchdown that helped him build a 10-0 halftime lead.
Foles remained poised, even after Josh Freeman threw two touchdown passes and Doug Martin ran for a third score to seemingly put the Buccaneers in command midway through the fourth quarter.
"He has the potential to be a special quarterback in this league, and he's growing up right in front of our eyes," Maclin said.
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 with just under three minutes remaining.
In just his fourth start in place of the injured Michael Vick, the 6-foot-6 rookie 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.
When Tampa Bay called time out to get its defense set, it gave Foles an opportunity to discuss the next call with Reid.
"We were on the same page. He trusts me, and that's big when you have your coach that trusts you in that situation," Foles said. "I told him I was comfortable with the play and he said, 'Let's do it.' The coaches were fired up."
The young quarterback rolled to his right and found Maclin open in the side of the end zone, where the receiver made the catch going to his knees before being pushed out of bounds by cornerback Leonard Johnson.
The Philadelphia sideline erupted in celebration, however Reid and his players couldn't be sure the team's longest losing streak since 1970 was over until Maclin's reception was upheld by the instant replay official.
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 keep Philadelphia's chances intact with his big completion to Avant cutting across the middle.
"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."
Tampa Bay (6-7) was impressed with Foles in the closing minutes, too.
"It's not easy to keep your poise when you're getting hit all day," Bucs defensive tackle Gerald McCoy said. "He did. He could have got nervous and he didn't. Sat in the pocket and made plays."
Rookie Doug Martin rushed for 128 yards for the Bucs (6-7), who have dropped three straight games following a four-game winning streak that propelled them into playoff contention following a 1-3 start.
Freeman was 14 of 34 for 189 yards, including TDs of 1 yard to Mike Williams and 13 yards to Vincent Jackson, who had six receptions for 131 yards.
"Any time we lose, it's frustrating, no matter what the reason is," Freeman said. "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: Tampa Bay held the Eagles to 29 yards rushing on 16 attempts. ... Avant finished with seven receptions for 133 yards and Maclin had nine catches for 104 yards. ... Philadelphia's Bryce Brown was limited to 6 yards rushing on 12 carries. ... Tampa Bay's 2002 Super Bowl championship team was honored at halftime. The Bucs beat the Eagles in the NFC title game that season.
Online: http://pro32.ap.org/poll and http://twitter.com/AP_NFL