(CNN) A plane carrying members of the University of Kansas men's basketball team had to make an emergency landing when an engine failed on their return flight to Kansas.

The emergency landing occurred shortly after the aircraft took off Sunday from San Jose, California, according to a statement released by the University of Kansas' Athletics Department.

"Upon our return flight home from San Jose, CA, roughly 20 minutes into the flight, one of the engines failed, " the school's statement said. "The pilot immediately contacted the San Jose Airport where we returned and made a safe landing. We are grateful to the pilots and the entire flight crew of Swift Air."

The team was headed to Lawrence, Kansas, after their win against Stanford on Sunday.

A video taken by Ryan White, senior athletic director at the University of Kansas, shows what appears to be flames coming from an engine on the flight before its emergency landing.

Read More