PONTIAC, MICH., NOV. 8 -- James Griffin's 29-yard return with a fourth-quarter pass interception set up a four-yard go-ahead touchdown run by Detroit's Garry James as the Lions shook off their troubles to upset the Dallas Cowboys, 27-17.

It was one of four interceptions by the Lions, who were called "lousy" by owner William Clay Ford two weeks ago. Ford, however, gave the team a pep talk earlier last week.

"Mr. Ford came in during the week and said to put everything behind us, that we've got an eight-game season right now," said quarterback Chuck Long, who notched his first NFL win as a starter. "This takes care of everything. I think it's going to settle all of those off-field distractions, in a hurry."

The victory snapped an eight-game losing streak by Detroit's regulars, who lost their last four games of 1986. The Lions, who got one win from their strike replacement players, are 2-6.

The Lions' losing streak has seemed to be the least of their problems recently. Defensive coordinator Wayne Fontes pleaded innocent to charges of drunken driving and cocaine possession last Tuesday. Friday, rookie defensive end Reggie Rogers, the team's No. 1 draft pick, was given 30 days leave to seek emotional help.

The Cowboys, who appeared flat after their emotional Monday night victory over the New York Giants, are 4-4, tied for second with Philadelphia in the NFC East, two games behind Washington.

With the score tied at 17 early in the fourth quarter, Dallas safety Bill Bates intercepted Long's pass in the end zone intended for James Jones.

But on the next play, Griffin picked off Danny White's pass intended for Rod Barksdale and returned it to the Dallas 9-yard line.

On the first play, following an illegal-use-of-hands penalty against the Cowboys' Mike Hegman, James dove into the end zone with 12:33 remaining for a 24-17 Detroit lead.

A fumble by Tony Dorsett set up Eddie Murray's 19-yard field goal with 9:06 remaining for Detroit's final margin.

"We just weren't mentally alert, for whatever reasons," Dallas Coach Tom Landry said. "It became obvious during the beginning of the ball game that we were going to struggle through the whole game.

"Usually when you do that, when the fourth quarter comes around, you're not going to make the plays to win the ball game."

Long completed 15 of 28 passes for 217 yards with two interceptions. Pete Mandley caught eight of Long's passes for 97 yards and also had a 61-yard punt return which set up Detroit's first second-half score.

White completed 17 of 38 for 193 yards, but was intercepted four times.

The Lions took a 10-0 first-quarter lead on a 30-yard field goal by Murray and a 20-yard touchdown pass from Long to Rob Rubick.

The Cowboys got a one-yard run by Timmy Newsome and a 38-yard field goal by Roger Ruzek in the second quarter to tie it, 10-10, at halftime.

James scored on a two-yard run in the third quarter and Newsome had a 24-yard touchdown run for the Cowboys to make it 17-17 heading into the final quarter.

Dallas 0 10 7 0 17 Detroit 10 0 7 10 27

First Quarter

De -- FG Murray 30, 9:39

De -- Rubick 20 pass from Long (Murray kick), 13:45 Second Quarter

Da -- Newsome 1 run (Ruzek kick), 12:14

Da -- FG Ruzek 38, 14:08 Third Quarter

De -- James 2 run (Murray kick), 3:02

Da -- Newsome 24 run (Ruzek kick), 5:42 Fourth Quarter

De -- James 4 run (Murray kick), 2:27

De -- FG Murray 19, 5:54

A -- 45,325

Cowboys Lions First downs 20 20 Rushes-yards 29-123 30-76 Passing yards 166 217 Return yards 55 132 Passing 17-38-4 15-28-2 Sacked-yards lost 3-26 0-0 Punts-average 6-42 5-46 Fumbles-lost 2-1 2-2 Penalties-yards 11-94 6-38 Time of possession 32:11

RUSHING -- Dallas: Walker 13-65, Newsome 4-29, Dorsett 11-29, White 1-0. Detroit: Jones 9-46, James 18-32,

PASSING -- Dallas: White 17-38-4, 193 yards. Detroit: Long 15-28-2, 217.

RECEIVING -- Dallas: Walker 5-55, Renfro 4-67, Cosbie 3-26, Newsome 2-20, Edwards 2-20, Dorsett 1-5. Detroi

MISSED FIELD GOALS -- Dallas: Ruzek, 36.