Williams scored the go-ahead basket on a layup with 15 seconds to go. On Ohio's following possession, Josh Mballa blocked Jason Preston's layup attempt with five seconds left. The Bobcats gathered the deflection, but a pass attempt to Sylvester Ogbonda was tipped by a Buffalo defender, ricocheted off Ogbonda's fingertips and went out of bounds.
Jayvon Graves made a pair of foul shots with 0.3 seconds to seal the win.
Davonta Jordan added 10 point for the Bulls (11-6, 2-2 Mid-American Conference). Buffalo has won two straight and five of its last seven.
Ben Vander Plas scored a career-high 28 points and Jason Preston tied a career-high 27 points for Ohio (9-8, 1-3). Ogbonda scored 12.
For more AP college basketball coverage: https://apnews.com/Collegebasketball and http://twitter.com/AP-Top25
The best high school basketball recruits we have ever seen
Who are the best college basketball prospects we have ever seen? Which prospects did we overrate and underrate? Our experts reflect.
NCAA grants DePaul's Jalen Coleman-Lands sixth year of eligibility
DePaul guard Jalen Coleman-Lands was granted a sixth year of eligibility by the NCAA on Wednesday.
SG Alex O'Connell transfers from Duke to Creighton
Alex O'Connell, who averaged 5.2 points and shot 27.3% from 3-point range for Duke last season, has transferred to Creighton, he announced.