TAMPA, Fla. — The Saints avoided winning their fewest games in a season since coach Sean Payton arrived in 2006 by beating Tampa Bay 23-20 on Sunday at Raymond James Stadium.

The Saints improved to 7-9, and Tampa Bay dropped to 2-14 to secure the first pick of the NFL draft in 2015.

Saints quarterback Drew Brees threw three interceptions against Tampa Bay for the second time this season, having also done so in an Oct. 5 victory against the Buccaneers in New Orleans. He also was 24-of-38 for a touchdown and 281 yards, leaving him short of the 329 yards he needed to post his fourth-straight season passing for at least 5,000 yards.

To win, the Saints’ defense prevented Tampa Bay from scoring in the second half. It also got an interception and a safety late in the fourth quarter to erase what had been a 13-point deficit at halftime.

After trading punts on their first two offensive drives, Tampa Bay moved to the Saints’ 21. Facing a second-and-10, Saints defensive linemen Cameron Jordan and Tyrunn Walker broke through to sack Bucs quarterback Josh McCown six yards behind the line of scrimmage. The Bucs had to settle for a 39-yard field goal by Patrick Murray two plays later, giving Tampa Bay a 3-0 lead with 6:03 left in the first quarter.

The Saints showed signs of putting a drive together on their next advance, converting a third-and-5 from their 20 when receiver Nick Toon caught a nice back-shoulder throw from Brees for a gain of 24. But the Saints punted on their next set of downs, in part because Brees was sacked for a loss of six.

On a drive that stretched into the second quarter, Tampa Bay drove 80 yards for a score. A 45-yard rush by running back Doug Martin set Tampa Bay up at New Orleans’ 7, and two plays later McCown beat a blitz to connect with rookie receiver Mike Evans for a 6-yard touchdown strike.

It was Evans’ 12th TD grab of the year, which set a new team record and helped put Tampa Bay up 10-0.

The Saints bit back with an 80-yard touchdown drive of their own, highlighted in part by crucial third-down conversion catches made by receivers Kenny Stills and Marques Colston that allowed New Orleans to reach Tampa Bay’s 15. From there, a 6-yard reception by Mark Ingram and an 8-yard run by Khiry Robinson set the Saints up at the 1.

Robinson then immediately punched in a 1-yard touchdown run on a quick snap to help make it 10-7 with 5:45 remaining in the half. It was his third of the season and first since he ran in an 18-yarder in overtime to give the Saints a 37-31 overtime win earlier this season. Robinson subsequently was sidelined for six games with a forearm injury but was active for the last four contests the Saints played this season.

When Tampa Bay got the ball back, it had two clutch third-down conversions of its own en route to a 74-yard, 10-play touchdown drive. The Bucs also got a 20-yard rush up the gut by running back Charles Sims, and they would’ve gotten a score if the Tampa Bay ball-carrier didn’t fall after colliding with teammate Tavarres King, a receiver. A defensive holding penalty on the Saints added five more yards to the run, and Tampa Bay was at New Orleans’ 20.

Four plays later, Sims ran past the goal-line from 8 yards out to help give Tampa Bay a 17-7 lead.

Brees tossed his 15th interception of the season on the next drive. On a third-and-2 from the Saints’ 28 and at the line of scrimmage, Bucs defensive tackle Clinton McDonald tipped a short pass intended for Colston.

Cornerback Leonard Johnson picked off the deflection for his first interception of the season, setting up Tampa Bay at New Orleans’ 34.

Murray soon booted a 26-yard field goal for the Bucs to widen their lead to 20-7 with six seconds left in the half. The Saints kneeled when they got the ball back and headed into the locker-room needing a 13-point comeback to avoid their fewest wins in a season since 2005, when a New Orleans team whose home stadium was destroyed by Hurricane Katrina won only three of 16 games they played on the road.

The Saints opened the second half with a possession, and backup tight end Benjamin Watson showed some fire with first-down catches on a second-and-11 and third-and-5. However, Brees was sacked for a second time on the drive. And when New Orleans reached Tampa Bay’s 31, Brees targeted Stills in the middle of the end zone, but he overthrew his mark.

Bucs cornerback Bradley McDougald fielded the errant pass in the end zone for his first career interception.

The Bucs — who lost veteran receiver Vincent Jackson to a groin injury early in the game — got the ball at their 20 after a touchback. But they ended up going three-and-out and punting after a holding call on left tackle Demar Dotson pushed Tampa Bay back to its 12.

Though it seemed they might at first, the Saints did nothing to capitalize on the defensive stop. On a third-and-15 at the Saints’ 40, Brees connected with Stills on a 44-yard pass in which the receiver — surrounded by defenders — leapt over his opponents, caught the ball and held onto it after being hammered.

The Saints were at Tampa Bay’s 16 and soon faced a third-and-10 from there. Brees went to the middle of the end zone for Colston, but he was intercepted by safety Keith Tandy. Tandy was the third Bucs player to get his first pick of the season at Brees’ expense, and Tampa Bay took over at its 3.

Nonetheless, the Saints forced a three-and-out on the Bucs’ ensuing drive, and Tampa Bay punted to New Orleans’ 46. At last the Saints were able to translate a stop into points, driving for 54 yards and a 1-yard touchdown run by Ingram on six plays to help make it 20-14 with 14:02 to go in the contest.

It was Ingram’s ninth touchdown run of the season. In his previous three years with the Saints and in the NFL, he never had more than five in a campaign. However, he finished 37 yards short of the 93 yards he needed to give the Saints their first 1,000-yard rusher since 2006.

The Saints’ defense forced its third-straight punt when the Bucs retook possession and set their offense up at New Orleans’ 13. But, after getting a first down on the opening play of the ensuing drive, the Saints punted the ball back to Tampa Bay.

McCown attempted his first two passes of the second half when his team got possession back. Both were on third-and-5 — the first went for a gain of six, but the second was intercepted by Saints cornerback Keenan Lewis at New Orleans’ 48. Lewis ran the pick back to midfield; it was his second of the season, first since a loss at Detroit on Oct. 19 and sixth since joining the Saints in 2013.

The Saints soon converted a fourth-and-2 from Tampa Bay’s 42 with a short pass to tight end Jimmy Graham. Then, on a third-and-6 from Tampa Bay’s 36, Brees connected with Colston short and over the middle. Colston outran two defenders for a score alongside the left sideline to help give New Orleans a 21-20 with 1:57 to go.

Tampa Bay began its next drive at its 17, but a holding penalty and a six-yard sack by Jordan had the Bucs looking at third-and-21 from their own 6. Galette then sacked MCown in the end zone for a safety that gave the Saints a 23-20 lead.

Strangely, Galette also recorded a safety in the win in New Orleans against Tampa Bay earlier in the year that loomed large in the victory.

The Saints recovered an onside kick and then ran the rest of regulation out.

Galette’s safety was his lone sack — he needed three against Tampa Bay to activate some $6.5 million in incentives in his playing deal that he could’ve been able to collect in the coming years. However, at least the Saints closed out a season that saw them fall short of the playoffs with a victory.