BEIJING — What began as a goodwill trip to China for the Georgetown men’s basketball team turned violent Thursday night, when its exhibition game against the Bayi Rockets deteriorated into a melee during which players exchanged blows, chairs were thrown and spectators tossed full water bottles as Hoyas players and coaches headed to the locker room at Olympic Sports Center Stadium.

Georgetown Coach John Thompson III pulled his players off the court with 9 minutes 32 seconds left in the game and the scored tied at 64 after a chaotic scene in which members of both teams began throwing punches and tackling one another.

Georgetown senior center Henry Sims had a chair tossed at him by an unidentified person, and freshman forward Moses Ayegba, who was wearing a brace on his sore right ankle, walked onto the court with a chair in his right hand. According to Georgetown officials, Ayegba had been struck, prompting him to grab a chair in self-defense.

It was the second time both benches emptied in a physical game marred by fouls. By halftime, Bayi had 11 fouls while Georgetown had 28.

Immediately before the fighting began, Bayi forward-center Hu Ke was called for a foul against Georgetown’s Jason Clark. The senior guard clearly took exception to the hard foul and said so to Hu, triggering an exchange of shoves.

That’s when players from the Georgetown and Bayi benches ran onto the court, and bedlam ensued.

“Tonight two great teams played a very competitive game that unfortunately ended after heated exchanges with both teams,” Thompson said in a statement. “We sincerely regret that this situation occurred.”

A statement from Bayi or Chinese officials was not immediately available.

A woman sitting in the Georgetown fan section directly behind the bench implored Chinese police to try to calm the situation, saying someone was going to get hurt. The Chinese police had been watching the tensions escalate to the point of physical confrontations but made no attempts to break up any of the fights taking place on the court.

Before anyone was seriously hurt, Thompson said, “We’re outta here,” and pointed toward the tunnel behind the Hoyas bench leading underneath the stands.

As Thompson and his staff summoned players together and began escorting them off the court, the group had to dodge plastic water bottles being hurled from the stands. Once they reached the safety of the locker room, the team immediately gathered all its equipment and headed for the buses outside.

Members of the Hoyas staff were trying to find a police escort for the entire Georgetown contingent, including alumni and supporters who attended the game as part of a 10-day tour of China, fearing reprisals from Chinese fans. But rather than wait, Thompson told everyone to walk to the buses together.

Earlier in the game, Rocket forward Xu Zhonghao had approached Thompson while he was yelling instruction to his players and then began berating him. Thompson stared at Xu in disbelief before officials halted play for several minutes in the third quarter. Moments later, Bayi player Wang Lei was called for technical foul for arguing a call, and play had to be stopped again.

The initial sign of trouble came three minutes into the second half, when Georgetown sophomore forward Nate Lubick exchanged words with a Rockets player, and play was halted for the first time in the game.

“We remain grateful for the opportunity our student-athletes are having to engage in a sport they love here in China,” Thompson said, “while strengthening their understanding of a nation we respect and admire at Georgetown University.”

Georgetown was scheduled to depart for Shanghai on Friday morning for the final five days of its trip, but it’s unclear whether the team will do so.