SANTA CLARA, Calif. (AP) -- Ezekiel Elliott gained 219 yards from scrimmage and tied a career high with three touchdowns just days after a legal reprieve put his suspension on hold and the Dallas Cowboys beat the winless San Francisco 49ers 40-10 on Sunday.
Elliott was granted his second temporary restraining order on Tuesday, putting his six-game suspension over domestic violence allegations on hold and then gave the Cowboys (3-3) a big boost on the field.
Elliott matched his season total of rushing touchdowns with two in the first quarter and then took a short pass from Dak Prescott 72 yards for another touchdown on Dallas' first possession of the second half to put the 49ers (0-7) away. Elliott ran for 147 yards on 26 carries to go with the big catch, setting a career high in scrimmage yards in a game.
That performance spoiled the starting debut of rookie quarterback C.J. Beathard , who was sacked five times, lost two fumbles and failed to lead the 49ers into the end zone until he scored on a run with the game out of hand in the fourth quarter.
Beathard finished 22 for 37 for 235 yards, but his fumble on a sack by DeMarcus Lawrence late in the first half ended a promising drive that went down to the 5.
The 49ers, the first team ever to lose five straight games by three or fewer points , were never really close against the Cowboys.
MOMENTUM TURNER: The 49ers got off to a good start when they forced a three-and-out on the opening possession. But Trent Taylor fumbled the punt return , setting up Dallas at the 20. Elliott ran three straight times and scored his first TD of the game from 1-yard out.
INJURED KICKER: The Cowboys lost kicker Dan Bailey to a right groin injury in the first half, forcing coach Jason Garrett to scramble a bit. Dallas went for the 2-point conversion following their first TD after Bailey's injury and couldn't convert. Safety Jeff Heath handled the kickoff duties after that and reached the goal line on his first kick. Heath got his shot at extra points in the second half and made two out of three. Heath is the first non-kicker or punter to make multiple extra points in a game since former Houston linebacker and current Packers GM Ted Thompson made four in 1980.
BIG CATCHES: While Elliott delivered most of the big plays for Dallas, tight end Jason Witten added an impressive catch of his own in the second quarter. He pulled in Prescott's 18-yard pass to the end zone with one hand to put the Cowboys up 20-3. Dez Bryant then delivered a big TD catch of his own in the fourth quarter, tying Bob Hayes' franchise record with the 71st in his career.
HALFTIME TRIBUTE: Former San Francisco 49ers great Dwight Clark addressed the crowd in an emotional halftime ceremony. Clark announced earlier this year that he had been diagnosed with amyotrophic lateral sclerosis, more commonly known as ALS or Lou Gehrig's disease.
The team brought in about 30 of Clark's former teammates, all wearing No. 87 jerseys, to honor him for his leaping grab in the back of the end zone for a a 6-yard TD in the final minute of a 28-27 win over Dallas in the NFC title game launched the 49ers dynasty.
Clark spoke haltingly to the crowd while describing the one wish he had for this day.
"I just want to see my teammates. And the 49ers heard that and flew all these players in so I could see them one more time," Clark said.
The 49ers lost RT Trent Brown to a concussion and LB Reuben Foster to a rib injury.
Cowboys: Visit Washington on Sunday.
49ers: Visit Philadelphia on Sunday.