Nebraska head coach Fred Hoiberg, who felt sick before the game, appears to be suffering from an illness while on the sideline. (0:16)

Nebraska coach Fred Hoiberg, who was taken to the hospital after the Cornhuskers' season-ending loss Wednesday, says he would not have been on the bench if he knew his presence could expose others to illness.

Hoiberg tweeted his comments Thursday morning, hours after he was diagnosed with influenza following Nebraska's 89-64 loss to Indiana in the first round of the Big Ten tournament in Indianapolis, noting he had been cleared to coach the game.

"Please let it be known that I would never do anything that would put my team, family or anyone else in harm's way," Hoiberg wrote.

Hoiberg left the game with four minutes remaining after looking ill on the bench. The broadcast showed him sitting with his head down.

The team and staff were held in the locker room for about two hours after the game out of concern over possible exposure to the coronavirus.

The school said in a statement that Hoiberg had been checked by medical personnel before the game. The coach left the contest for "precautionary reasons," the school said. He was transported to a hospital and diagnosed with influenza A (common cold).

"He has since been released and has returned to the team hotel," Nebraska said.

Hoiberg also noted the current situation surrounding the coronavirus pandemic, calling it a "scary time for all of us" and offering thoughts and prayers to those affected by the disease.

For most people, the coronavirus causes only mild or moderate symptoms, such as fever and cough. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia. The vast majority of people recover from the virus.

The NCAA announced late Thursday afternoon that it has canceled its men's and women's basketball tournaments as well as all remaining winter and spring NCAA championships because of the spread of the coronavirus. The unprecedented move came a day after the NCAA announced the games that were scheduled to start next week would go on but be played in mostly empty arenas.

The stunning end to the basketball season came about four hours after a frantic morning when conference tournaments around the country came to a sudden halt. Moments away from tipoff at some arenas, and minutes apart, each Power 5 conference canceled its remaining games. Smaller conferences followed suit, shutting down their tournaments, and within a few hours 58 men's games scheduled in 16 conferences had been canceled.

The 47-year-old Hoiberg has undergone two open-heart surgeries, one in 2005 and one in 2015 to replace an aortic valve.

Hoiberg took over at Nebraska (7-25) last spring after three and a half seasons with the Chicago Bulls. Hoiberg was the coach at Iowa State for five seasons following time in the Minnesota Timberwolves' front office.

The Associated Press contributed to this report.