In a wild game with 800 yards of passing, Dan Fouts outdueled Joe Montana today by throwing for five touchdowns as the San Diego Chargers beat the reeling San Francisco 49ers, 41-37.

Fouts completed 33 of 48 passes for 450 yards, with three of his touchdown throws going to Wes Chandler. Montana completed 31 of 46 passes for 356 yards and three touchdowns, but the 49ers lost their fourth game against two victories and are in danger of not making the playoffs after winning the Super Bowl last season.

Between them, Fouts and Montana completed 65 passes for a league record, breaking the mark of 63 set by the New York Jets and 49ers two years ago.

The 450 yards was Fouts' personal high. Montana broke one of Fouts' league records with his fifth 300-yard-plus game passing. Fouts now has three 400-yard games. He was not intercepted or sacked.

"We decided to give our punter the day off," said Fouts.

San Francisco cornerback Eric Wright, who was trying to stop Chandler on the three touchdown passes, probably spoke for most defensive players when he said, "It was pretty much of a nightmare."

Although Chandler and Charlie Joiner were Fouts' favorite receivers, it was a three-yard throw to Chuck Muncie with 3:22 remaining that won the game. The Chargers (4-2) probably need to win only one of their last three games to gain the playoffs.

After Muncie scored, the 49ers had the ball once more, but linebacker Woodrow Lowe intercepted a pass by Montana with 1:44 remaining and the Chargers ran out the clock.

Fouts' touchdown passes to Chandler covered 31, 14 and 20 yards. Eric Sievers, the tight end out of Maryland, scored on a 25-yard catch.

The Chargers scored on five consecutive possessions to take a 31-17 lead in the third quarter. Chandler's third touchdown followed cornerback Jeff Allen's interception of Montana at the San Diego 41.

The 49ers then scored twice but trailed by a point when Wersching missed on the extra-point kick after the second touchdown.

Rolf Benirschke's second field goal raised San Diego's lead to 34-30 three minutes into the last period and, once again, the 49ers rallied with Montana taking them 79 yards in 11 plays for a 37-34 lead. There was 6:41 left.

After the kickoff, Fouts completed four of five passes for 65 yards, the last three yards coming on the pass to Muncie.

Fouts' previous one-game high was 444 yards against the New York Giants in 1980. He passed for 433 yards against Miami in the 1981 playoffs. Montana completed his first 15 passes, setting a club record. Dwight Clark caught 12 passes, another club record; Chandler gained 125 yards on his seven catches.