The BBC's decision to invite BNP leader Nick Griffin to appear on Question Time may be illegal, Welsh secretary Peter Hain has warned.

Following a court ruling last week that the BNP's membership policy was in breach of the Race Relations Act, Hain wrote to BBC director general Mark Thompson arguing that the BNP is an "unlawful body".

The show, on Thursday 22 November, is due to feature Griffin with representatives of all three major parties, including justice secretary Jack Straw.

It is the first time BNP representatives have appeared on Question Time. The BBC decided to invite the party to appear on its flagship panel show following its success in the European elections, when two BNP candidates - including Griffin - were elected as MEPs.

In last week's court case, the party agreed to amend its constitution, which restricted membership to "indigenous Caucasion" people.

Hain, an anti-apartheid activist before becoming an MP, wrote: "Now that the BNP have accepted they are at present an unlawful body, it would be perverse of you to maintain that they are just like any other democratically-elected party. On their own admission, at present, they are not.

"If you do not review the decision you may run the very serious risk of legal challenge in addition to the moral objections that I make. In my view, your approach is unreasonable, irrational and unlawful."

He suggested that the invitation be suspended until the constitution was written. He said: "In the meantime, surely you have no choice but to rescind the invitation and await the court's final decision on the matter?

"You are giving the BNP a legitimacy even they dare not claim in their current unlawful status."

The BBC said it would respond to the letter "in due course". A spokesman defended the decision. "Our understanding is that, if there was an election tomorrow, the BNP would be able to stand."

Apart from Straw, the panel is expected to include Bonnie Greer, a black writer and broadcaster, and Baroness Warsi, the Conservative spokeswoman for community cohesion, who is of Pakistani origin. A posting on the BNP website derides Greer as a "black history fabricator", and Warsi as a "product of Tory affirmative action".