RIO DE JANEIRO - A Namibian boxer who was accused of attempting to sexually assault a maid at the Olympic Village has been released and is free to compete, a spokesman for the Rio 2016 organizers said on Thursday.

Jonas Junius, who is competing in the light welterweight division and was the flagbearer for his country at the opening ceremony, was detained after he grabbed the maid and tried to kiss her, police said on Monday.

On Wednesday, a Brazilian judge also released a Moroccan boxer, Hassan Saad, who was accused of sexually assaulting two maids, but said he cannot approach the Village or leave Rio without authorisation.

If convicted, Junis could face six to 10 years in prison.

"Brazilian law needs to be respected and this is something that we have to agree on," said Mario Andrada, spokesman for the Rio 2016 Organizing Committee. "What we need to do is make sure that all the legal procedures are being followed and we understand that they have."

"Both boxers have been released but that doesn't mean that the legal process is over. They have been released and... one of them is able to compete."