TAMPA, Fla. - The Philadelphia Eagles discovered Sunday that snowballs don't last in sunny, 70-degree weather.

They snapped their eight-game losing streak and did it in the most exciting manner possible. Rookie quarterback Nick Foles' 1-yard touchdown pass to wide receiver Jeremy Maclin with no time remaining gave them a 23-21 victory over Tampa Bay at Raymond James Stadium.

"I'm just so proud of the guys for the way they fought their tails off out there," Eagles coach Andy Reid said. "As a team, they fought like crazy. It's been a while since we won one."

The win was the first for the Eagles (4-9) since a 19-17 victory over the New York Giants on Sept. 30. The eight straight defeats were their most ever since Reid arrived in 1999 and marked the longest losing skid since they dropped 11 in a row in 1968.

They looked headed to a ninth straight defeat at one point Sunday after falling behind 21-10 but managed to pull together.

"We had been in that position before and once we lost the lead in those games, things would just start to snowball on us," Eagles defensive tackle Cullen Jenkins said. "We didn't want that to happen again. This time, everybody just stuck together and it paid off.

"I can't tell you how good it feels to finally win a game. It's been too long."

When replay officials confirmed Maclin's touchdown and Alex Henery booted a meaningless extra point, the entire team stormed onto the middle of the field and exchanged hugs and high-fives on top of the Buccaneers' logo. Reid and offensive-line coach Howard Mudd embraced. In the stands, a few thousand Eagles fans rejoiced.

"It felt great to look over and see our fans erupting like us," Foles said. "They've been suffering just like we have. I'm just so excited for my teammates, coach Reid, our organization. It's just very special and very humbling. The emotions are going crazy right now. It's a big win for us, especially because we came back to get it."

Foles turned in an outstanding performance. He completed 32-of-51 passes for 381 yards and two touchdowns and ran for another TD. He set the franchise rookie record for passing yards in a game, breaking the mark of 289 set by Davey O'Brien in 1939.

But the Eagles still almost lost.

They took a 10-0 halftime lead, but it promptly disappeared after the Bucs were finished celebrating the 10th anniversary of their 2002 Super Bowl championship. A pair of Josh Freeman touchdown passes and rookie running back Doug Martin's 4-yard touchdown run left the Eagles trailing 21-10 with 7 minutes, 21 seconds left in regulation.

The Eagles cut it 21-16 on Foles' 11-yard touchdown pass to tight end Clay Harbor with 3:55 remaining. The Eagles' defense then made a pivotal stop and gave the ball back to Foles and company with 2:44 to go.

"All we could think about," Eagles defensive end Brandon Graham said, "was getting off the field and giving the ball back to our offense."

Foles, who was named the starting quarterback for the rest of the regular season last week by Reid, coolly moved the offense toward the end zone with a few big plays in the clutch, including a 23-yard pass to Maclin early in the 64-yard drive and a 22-yarder to wide receiver Jason Avant on fourth down from the Bucs' 23-yard line.

There were 10 seconds showing on the scoreboard clock next to the Bucs' giant pirate ship. The Eagles' offense sprinted downfield and arrived to join Avant just in time for Foles to spike the ball with 2 seconds remaining. After Tampa called timeout, Maclin made his sliding catch in the corner of the end zone.

"It just happened to fall like that, but I didn't care how we did as long as we won," Maclin said. "Not winning in two months, that's just crazy. This one feels good."

The Eagles haven't had much to feel good about this season. Despite beating the Bucs (6-7), they were officially eliminated from the NFC playoff race on Sunday. Seattle's victory over Arizona knocked them out of the wild-card chase. Dallas' win over Cincinnati ensured that the Eagles cannot win the NFC East.

Reid is expected to be fired at the end of the season.

No wonder they relished the chance to feel good about themselves for the first time in 10 weeks.

"You go (over) two months without winning a game in Philadelphia, that's a tough thing, man," Reid said. "I'm proud of them for staying true to themselves and for the way they just kept fighting."

Contact David Weinberg: