MORGANTOWN, W.Va. (AP) — CJ Donaldson had two short rushing touchdowns and West Virginia became bowl eligible with a 31-21 victory over UCF on Saturday.

Garrett Greene threw a TD pass in his final home game and Jahiem White added a short rushing score for the Mountaineers (6-5, 5-3 Big 12).

West Virginia avoided losing for the fifth time at home, which hasn’t happened since 1990. Whether the win was enough for embattled coach Neal Brown to keep his job remains to be seen.

UCF (4-7, 2-6) is assured of its second straight losing season under coach Gus Malzahn.

Donaldson, averaging 53 rushing yards per game, finished with 96 yards. He came out determined with 56 yards on his first four carries, including a 1-yard run on West Virginia’s opening series.

West Virginia cornerback Dontez Fagan then recovered a fumble by UCF quarterback Dylan Rizk, and Donaldson ran for 28 more yards on the next series that was capped by White’s 3-yard TD run.

Greene struggled in the passing game for most of the first half, then went 4 of 6 for 65 yards just before halftime, hitting Rodney Gallagher with a 12-yard TD toss for a 21-7 lead.

Rizk went 11 of 21 for 172 yards, including a 45-yard scoring strike to Kobe Hudson. RJ Harvey, the Big 12’s leading rusher, ran for 130 yards and two scores, including a 9-yard TD run that brought UCF within 31-21 with 5:20 left.

But the ensuing onside kick didn’t go the required 10 yards. Greene then converted a pair of fourth-down passes and West Virginia ran out the clock. Greene finished 13 of 21 for 118 yards.

The takeaway

UCF: The Knights outgained West Virginia 348 yards to 318 but now have lost seven of eight games following a 3-0 start.

West Virginia: The Mountaineers won despite being stuck in many third-and-long situations on offense against a solid effort from UCF’s defensive front.

Up next

UCF: Hosts Utah on Friday night.

West Virginia: Finishes the regular season at Texas Tech next Saturday.

___

Get alerts on the latest AP Top 25 poll throughout the season. Sign up here. AP college football: https://apnews.com/hub/ap-top-25-college-football-poll and https://apnews.com/hub/college-football