The BBC has apologised after one of its reporters asked Morocco’s football captain an “inappropriate” question before the team’s World Cup match against Germany on Monday.

Morocco’s debut at the tournament in Australia made it the first Arab and north African team to qualify for the Women’s World Cup. But it was an “unethical” and “dangerous” question directed at the team’s captain, Ghizlane Chebbak, about LGBTQ+ rights that has since taken centre stage.

“In Morocco it’s illegal to have a gay relationship. Do you have any gay players in your squad, and what’s life like for them in Morocco?” the BBC reporter asked at the post-match media conference in Melbourne.

Laws that discriminate against women and LGBTQ+ individuals remain in place in Morocco. Acts between members of the same sex, referred to as “sexual deviancy”, are punishable with up to three years in prison, according to Human Rights Watch.

In response to the question, Chebbak winced, removed her ear piece and looked to her coach, Reynald Pedros, before laughing. A Fifa official interjected: “Sorry, this is a very political question,” and asked the reporter to stick to questions relating to football.

“No, it’s not political, it’s about people,” the reporter replied. “Please let her answer the question.”

On Tuesday, a BBC spokesperson said: “We recognise that the question was inappropriate. We had no intention to cause any harm or distress.”

The Guardian understands the matter was addressed by Fifa after the conclusion of the press conference.

Shireen Ahmed, a journalist for CBC Sports, was present at the press conference and said the question was bizarre and out of line. While the question was interrupted by a Fifa media officer, Ahmed said it should not have been asked in the first place.

“This isn’t an issue of journalistic freedom. You can inquire about social laws in different places without endangering people. Journalists have an obligation to be fair, accurate and practise with care. If reporting harms someone, it is not only unethical but dangerous,” said Ahmed.

Steph Yang, a reporter for the Athletic, described the press conference as a “little tense”.

“From a harm reduction perspective, this is not an appropriate question for a player and would have endangered the players themselves,” said Yang.

“We are obviously going to talk about the intersection of politics and sports at this World Cup, and it’s vital to do so. But we should take care that our questions don’t cause further harm to those impacted by those very politics.”

Before the tournament, which kicked off in Australia and New Zealand last week, football federations, human rights organisations and players decried a potential sponsorship deal for the tournament between Fifa and Saudi Arabia’s tourism authority. In Saudi Arabia, women’s rights are restricted under strict male guardianship laws and homosexuality is illegal.

While the Saudi sponsorship deal later fell through, Fifa banned players from wearing a OneLove armband or rainbow armband in support of LGBTQ+ rights.

The rules are a continuation of the regulations from the men’s World Cup last year in Qatar. In June, Fifa announced eight alternative options, in consultation with the 32 participating women’s teams, players and United Nations agencies.

Chebbak, who plays for the Moroccan club AS Far, is a popular figure in Moroccan women’s football. The country’s World Cup debut comes after greater investment in recent years from the Moroccan football federation and the creation of a professional league. The team lost 6-0 to Germany on Monday.

Fifa and the Moroccan FA have been approached for comment.