The TV series Dukes of Hazzard has been pulled from US screens because of controversy surrounding its use of the Confederate flag, but the Abbott administration's most senior Indigenous affairs bureaucrat in the Northern Territory failed to heed the warning signs.

The Northern Territory manager in the Department of the Prime Minister and Cabinet, Mark Coffey, won the best-dressed prize for turning up to a Beef Breeders' dinner in Alice Springs wearing a shirt emblazoned with the flag beloved by white supremacists.

The Rebel standard became internationally infamous when Dylann Roof, the young racist who allegedly killed nine people in a black church in Charleston, South Carolina, last month, posed with the flag shortly before the massacre. It has since been removed from sale by the US giant WalMart, and the South Carolina Senate has voted to remove it from government buildings.

The flag divides those who see it as a symbol of slavery and racism while others say it is a respected part of US heritage and history.

A spokesman from the Prime Minister's department said the department was aware of the matter.

"The officer involved apologises if offence was taken," he said.

Follow us on Twitter