The presenters of the British TV show "Top Gear" have painted two cars used in an episode shot in Brunei in the colors of the rainbow flag in a show of solidarity with LGBT+ people over a plan to impose the death penalty for gay sex.

The episode was filmed in March, just before the small Southeast Asian country rolled out its interpretation of Islamic laws, punishing sodomy, adultery and rape with death, including by stoning.

Brunei backtracked on the plan following a global backlash led by celebrities including George Clooney and Elton John.

The BBC, which broadcasts "Top Gear," said former international cricketer Andrew "Freddie" Flintoff and comedian Paddy McGuinness would not have gone to Brunei if they had known about the law.

"This was an issue that both Freddie and Paddy felt very strongly about and asked to address in the show," a spokesman told the Thomson Reuters Foundation.

"They would not have traveled to Brunei had these new laws been announced or implemented prior to departure."

The message of inclusion is a change of tone for the show, whose previous host Jeremy Clarkson faced frequent criticism over comments seen as homophobic or offensive.

In 2007, Clarkson described a car on the show as "a bit gay," and received criticism earlier this year for homophobic comments made on Amazon original show, "The Grand Tour."

The episode will air in July with the rainbow-colored cars used to film in Brunei displayed in the studio with the audience.