The drag queen "La Prohibida" starred on one of the floats in the Epiphany feast parade in the Puente de Vallecas district in southern Madrid, one of 17 parades planned for the Spanish capital.
The parades are held across the country each year on the eve of the Feast of the Epiphany, which celebrates the coming of three wise men with gifts for Jesus.
Children write letters to the Magi asking for gifts, which are left for them on 6 January, a national holiday. The celebration is more popular than Christmas in Spain and in parts of Latin America.
The float featuring La Prohibida was proposed by Orgullo Vallekano, a gay rights association based in the Vallecas district, whose local football club, Rayo Vallecano, wore rainbow shoelaces and T-shirts during matches as part of a campaign against homophobia in football.
Spanish conservative politicians and some media had criticised Madrid city hall for allowing a drag queen to take part in an Epiphany feast parade, arguing it is “distorting” an event aimed at children.
The drag queen answered the float aimed to defend “diversity and equality” and questioned on Twitter why nobody had complained when previous parades featured people dressed up as Star Wars characters that had nothing to do with Christmas.
Two years ago the Vallecas district chose a woman to represent one of the three kings at its Epiphany parade to promote equality.
Vallecas' soccer team wearing rainbow T-shirts