ANAHEIM, CALIF., NOV. 18 -- Troy Aikman threw for 303 yards and three touchdowns, and Emmitt Smith totaled 171 yards rushing and receiving today to lead the Dallas Cowboys to a 24-21 victory over the Los Angeles Rams.

Ken Willis's 23-yard field goal with 4:24 to go provided the Cowboys' margin of victory.

Aikman drove the Cowboys (4-7) to the score after Cleveland Gary of the Rams (3-7) fumbled the ball away at the Dallas 5-yard line.

Aikman completed 17 of 32 with one interception and threw touchdown passes of 10 and 61 yards to Michael Irvin, and six yards to Tommie Agee.

The Cowboys had not scored a touchdown in two games.

Smith had four receptions for 117 yards and rushed 21 times for 54 yards.

Gary's fumble overshadowed his three touchdowns. He rushed 103 yards and scored on runs of 16, 4 and 1 yards.

The Rams had second and goal at the 6-yard line when linebacker Ken Norton tackled Gary and recovered the ball.

Smith made a big play as the Cowboys moved down to the winning field goal, turning a short pass into a 44-yard gain down to the Rams 27.

Gary pulled the Rams even at 21 with his third touchdown, a one-yard dive early in the third quarter. He also set up the score with a 48-yard run to the 24-yard line.

The Cowboys took a 21-14 lead into the second half because Aikman threw two long completions in a span of 2:22 late in the second quarter.

After Aikman found Smith for a 57-yarder, Agee caught the six-yard scoring throw.

After a punt, Aikman spotted Irvin open behind the defense and threw him a 61-yarder to put his team ahead.

The Rams went ahead by 14-7 on Gary's four-yard run earlier in the second quarter.

He had scored on a 16-yard run early in the game, with the touchdown set up by Vince Newsome's inteception of Aikman's first pass. Newsome returned the interception 11 yards to the Cowboys' 36.

Aikman's first touchdown pass of the afternoon, a 10-yarder to Irvin, tied the score at 7 midway through the opening quarter.