Randall Cunningham threw three touchdown passes, two to Fred Barnett, and the Philadelphia Eagles beat the Phoenix Cardinals 23-21 Saturday, clinching the home-field advantage for their first playoff game.

The Eagles (10-6) will be at home against the Washington Redskins in an NFC wild-card game next weekend.Phoenix ended its season with its third consecutive loss and finished 5-11 for the second straight year, despite two late touchdown passes by Timm Rosenbach that made the game close.

Cunningham completed 13 of 19 passes for 172 yards and rushed four times for 60 yards before being replaced by Jim McMahon late in the third quarter.

Cunningham entered the game needing 87 yards to break the NFL's single-season record for most yards rushing by a quarterback - 968, set by Chicago's Bobby Douglass in 1972.

Cunningham's 16-yard touchdown pass to Barnett 1:41 into the game gave Philadelphia a 7-0 lead. The score came two plays after Eric Allen recovered Johnny Johnson's fumble at the Phoenix 20-yard line.

The Eagles led 13-0 when Cunningham hit Calvin Williams for a 27-yard score 2:51 into the second quarter. It was Williams' ninth TD catch this season, setting a team record for rookies.

The eight-play, 80-yard drive started when a fumbled hold aborted a 30-yard field goal try by the Cardinals' Al Del Greco. Roger Ruzek missed the extra point for Philadelphia, his third miss in 47 attempts this season.

Phoenix closed to 13-7 on Rosenbach's 12-yard touchdown pass to Roy Green 6:13 before halftime, ending a 13-play, 74-yard drive.

Lonnie Young ended an Eagle scoring threat with an interception at the Cardinals 2 with 38 seconds remaining in the half.

Cunningham lofted a 3-yard scoring pass to Barnett with 7:12 left in the third quarter for a 20-7 lead and Ruzek added a 44-yard field goal with 9:11 to play.

Rosenbach's 38-yard touchdown pass to Ricky Proehl with 5:56 remaining pulled Phoenix within 23-14. He then tossed a 45-yarder to J.T. Smith with 1:51 to play.

Del Greco's first on-side attempt went out of bounds, and Philadelphia covered the second attempt, running out the clock.