The Washington Redskins sprinted to an early lead Sunday at Raymond James Stadium by tightening up their defense and being efficient on offense.

Things unraveled in the second half. They fell behind in the final two minutes and had to endure some anxious moments late in the game before beating the Tampa Bay Buccaneers, 24-22, on Billy Cundiff’s 41-yard field goal with three seconds left.

Cundiff connected on the game-winner after missing three earlier field goal attempts, including a misfire from 31 yards early in the fourth quarter with the Redskins leading, 21-13. The Buccaneers went ahead on Connor Barth’s 47-yard field goal with 1 minute 42 seconds to go but left enough time for Redskins rookie quarterback Robert Griffin III to work some magic and get his team in position for Cundiff’s winning kick.

“I just knew he wasn’t going to miss four,” Redskins tight end Fred Davis said. “I just knew he wasn’t.”

Cundiff had missed from 41 and 57 yards in the first half. “I could get real kicker-specific,” he said of the final kick. “Or I could just tell you that I didn’t choke.”

The Redskins nearly squandered a 21-3 lead but ended a two-game losing streak and evened their record at 2-2.

“There’s a huge difference between 2-2 and 1-3,” linebacker Ryan Kerrigan said. “Hopefully this can be the start of good things to come for us.”

It looked like things might be easy for the Redskins when they scored first-half touchdowns on a fumble recovery in the end zone by wide receiver Pierre Garcon and runs by Griffin and tailback Alfred Morris.

Morris rushed for 113 yards on 21 carries as the Redskins, at times, dialed back some of the spread-offense, pistol-formation and triple-option looks on offense that had given opposing defenses problems in the first three games but also had exposed Griffin to many jarring hits.

Griffin had a superb outing, connecting on 26 of 35 passes for 323 yards. He added 43 yards on seven rushing attempts. The Redskins had no turnovers. But they didn’t make things easy on themselves.

“We gave them a chance . . . . We’ve got to play better [but] it’s always nice to come back and do the things we did at the end of the game to find a way to win,” Coach Mike Shanahan said.

The defense limited the Buccaneers (1-3) to a pair of first-half field goals by Barth, both from 50 yards or beyond. But Tampa Bay struck for a third-quarter touchdown on a seven-yard pass from quarterback Josh Freeman to wide receiver Vincent Jackson and, after Cundiff’s third miss, added a fourth-quarter touchdown on a two-yard run by tailback LeGarrette Blount.

The Buccaneers, after being pushed back by a false-start penalty, failed on a two-point conversion try when Freeman threw an incompletion. But they regrouped to move ahead on Barth’s third field goal of the game.

That, however, merely put the game back in Griffin’s hands. “We knew we had to get in field goal range so we needed to get to the 30-yard line,” Griffin said. “. . . It was a lot of fun for us to go out there and win a game the way we did.”

The Redskins’ faith in their rookie quarterback is complete, only four games into his NFL career. He nearly pulled off a dramatic comeback late in a loss at home to the Cincinnati Bengals a week earlier.

This time, he and the rest of the Redskins’ offense got it done in crunch time, even with the receiver in Griffin’s helmet not operating on the final drive.

“He’s a winner,” said Redskins cornerback DeAngelo Hall, who had an interception to set up a first-half touchdown, of Griffin. “It’s starting to rub off.”

Said Davis: “He’s a guy with character. He’s out there getting hit, [taking] tough hits on him. He’s still out there running around and making plays. I have a lot of confidence in him.”

The Redskins continued to have issues on defense, at least in the second half, after surrendering 101 points, 10 touchdown passes and 1,050 passing yards in their first three games. Freeman threw for 299 yards on 24-for-39 passing. The Buccaneers had two 100-yard receivers: Jackson finished with 100 receiving yards and fellow wideout Mike Williams had 115 more.

But the Redskins at least could savor a victory at the end of a long day full of plot twists.

“We had to believe and be positive,” Davis said. “You can definitely get frustrated at times when you’re not doing what you want to do. But we kept persevering and made some plays and it happened for us.”