He 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 Foles a chance for one more play.
The 6-foot-6, third-round draft pick rolled to his right and found Maclin opened in the side on the end zone, when the receiver made the catch going to his knees.
Officials reviewed the play and upheld the call.
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 a 10-0 halftime deficit to take a 21-10 lead on Martin's 4-yard TD run midway through the fourth quarter.
That's when Foles, who also scored on a 10-yard run in the first half, took over.
The Eagles drove 72 yards in eight plays to cut into their deficit on 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 less than three minutes to go.
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.
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 (4-10) won for the first time since beating the New York Giants 19-17 on Sept. 30. They led 10-0 at the 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.
Most of the members of Tampa Bay's 2002 championship team, including Warren Sapp, Derrick Brooks, John Lynch, Simeon Rice and Keyshawn Johnson, returned to town for a dinner Saturday night and were recognized during a halftime ceremony capped by the introduction of coach Jon Gruden, who trotted out of the tunnel carrying the Super Bowl trophy.
The only player remaining from that roster who's still playing in the NFL is 16th-year pro, Ronde Barber, made his 212th consecutive start Sunday. It was his interception and 92-yard run that clinched Tampa Bay's 27-10 victory over the Eagles in the NFC championship game.
Philadelphia 23, Tampa Bay 21
Philadelphia 0 10 0 13 23
Tampa Bay 0 0 7 14 21
Phi • FG Henery 28, 7:13.
Phi • Foles 10 run (Henery kick), 1:40.
TB • Williams 1 pass from Freeman (Barth kick), 11:35.
TB • Jackson 13 pass from Freeman (Barth kick), 14:26.
TB • Martin 4 run (Barth kick), 7:21.
Phi • Harbor 11 pass from Foles (pass failed), 3:55.
Phi • Maclin 1 pass from Foles (Henery kick), :00.
Attendance • 64,941.
First downs 23 18
Total Net Yards 367 314
Rushes-yards 16-29 32-136
Passing 338 178
Punt Returns 5-35 4-63
Kickoff Returns 3-88 2-47
Interceptions Ret. 0-0 0-0
Comp-Att-Int 32-51-0 14-34-0
Sacked-Yards Lost 6-43 2-11
Punts 7-49.0 10-42.4
Fumbles-Lost 1-1 1-0
Penalties-yards 2-13 8-60
Time of Possession 29:51 30:09
Rushing • Philadelphia, Foles 3-27, Brown 12-6, Lewis 1-(minus 4). Tampa Bay, Martin 28-128, Freeman 2-13, Blount 1-2, Ware 1-(minus 7).
Passing • Philadelphia, Foles 32-51-0-381. Tampa Bay, Freeman 14-34-0-189.
Receiving • Philadelphia, Maclin 9-104, Avant 7-133, Harbor 6-52, Cooper 4-37, D.Johnson 2-20, Brown 2-6, Lewis 1-28, Celek 1-1. Tampa Bay, Jackson 6-131, Williams 3-18, Martin 3-4, Clark 1-19, Underwood 1-17.
Missed Field Goals • Philadelphia, Henery 58 (WL), 31 (WL).