CLEVELAND -- Shooting guard Wayne Ellington scored the Cavaliers' last four points, including two free throws with 2.8 seconds left, as Cleveland slipped past the Utah Jazz 104-101 on Wednesday at Quicken Loans Arena.
The Cavs (21-40) ended the game on a 12-1 run.
They trailed the entire second half until Ellington's slam dunk with 56 seconds left, which handed the Cavs a 102-101 lead.
Cavs guard Kyrie Irving's 3-point play with 1:07 left had pulled the Cavs to within one point, 101-100.
Irving, who shot just 7 of 20 from the field, recorded a double-double with 20 points, 10 assists and seven rebounds. He had 11 points in the fourth quarter.
Power forward Tristan Thompson added 16 points and 12 rebounds, while Ellington had 16 points and six rebounds. Forward Alonzo Gee contributed 15 points and five rebounds.
C.J. Miles, who spent the previous seven seasons in Utah, came off the bench to score all 12 of his points in the fourth quarter.
Jazz swingman Gordon Hayward led all scorers with 25 points and seven assists.
Former Cavs guard Mo Williams, playing for the first time since he injured his thumb on Dec. 22, had eight points and six assists. However, his layup attempt rolled out of the basket with 4.9 seconds left.
He missed a 21-footer at the buzzer for the Jazz (32-29), who are hanging onto the eighth spot in the Western Conference playoff race.
Utah was playing without its best player in center Al Jefferson. The 6-foot-10, 289-pounder is averaging 17.7 points, 9.4 rebounds and 1.2 blocks.
The Jazz were outrebounded by the Cavs, 49-38.
Center Enes Kanter added 17 points and seven rebounds for the Jazz, while forward Paul Millsap had 16 points and eight rebounds.
The Cavs snapped a two-game losing streak. Utah had won six in a row over the Cavs before Wednesday.
The Cavs trailed by eight points after three quarters, 76-68.
The Jazz embarked on a 16-3 run to take a 71-58 lead with two minutes left in the third quarter.
Kanter had 13 points and six rebounds entering the fourth quarter. The Jazz seemed too deep for the short-handed Cavs, playing their second game without Dion Waiters.
Hayward made 5 of 9 shots, including 2 of 3 from behind the arc, for 15 points in the second quarter.
Utah outscored the Cavs in the second, 32-26. The Jazz had a two-point edge at halftime, 51-49.
The Cavs opened up a four-point advantage, 23-19, after the first quarter. They shot just 40 percent from the field in the first quarter.
The Jazz shot 38.1 percent in the opening quarter. Millsap had six points and Williams five.
Notes: Williams missed 32 games after having surgery on his right thumb Jan. 2. He was injured on Dec. 22 at Miami. He has missed more games than he's played this season. He is averaging 12.9 points and 6.7 assists in 24 games. The 30-year-old Williams played for the Cavs from 2008-11 before being dealt to the Los Angeles Clippers in the Baron Davis trade in February 2011. The first-round pick the Cavs received from the Clippers turned into Kyrie Irving. Williams was anxious to return to his old stomping ground. "(It) would be great to play in front of those fans," Williams told the Salt Lake Tribune. ... The Jazz also benched small forward Marvin Williams in favor of DeMarr Carroll. ... Cavs coach Byron Scott has devised a plan to keep the bug that has ravaged his team from being even more contagious. "We'll wear gloves and surgical masks," he joked. Cavs center Tyler Zeller returned to the starting lineup for the Utah game on Wednesday. Zeller and shooting guard Dion Waiters missed Monday's game and spent some time in the hospital over the weekend with flulike symptoms. They were throwing up and had extreme pain in their stomachs. Guard Daniel Gibson was added to the list on Wednesday. Waiters and Gibson were told to stay home. Scott said Waiters had a doctor's visit on Wednesday. The 7-foot, 250-pound Zeller returned to practice on Tuesday. ... Cavs forward Omri Casspi said he's been cleared to begin some activities on the court. He had an appendectomy on Feb. 23. "I haven't done anything for two weeks," he said.