Christopher Rogers, 40, deputy chairman of Manchester City Council education committee, believed in satanism, Peter Joyce QC, for the prosecution, said at Nottingham Crown Court.
Colin Henry, 37, a joiner, was a supporter of witchcraft.
After they had watched a sado- masochistic video, Mr Rogers changed into women's clothing and they began to argue about the relative merits of their beliefs. Mr Rogers called Mr Henry 'stupid' because he believed in witchcraft, said Mr Joyce. Mr Henry then stabbed the Labour councillor twice in the chest with a six-inch knife.
He told police: 'He called me 'stupid'. There is no problem. I have killed him. I said I would do it and I have done it.'
Mr Joyce said the two men and a third homosexual were staying the night at Mr Henry's home in Carlton, Nottingham, on 21 February last year. The attack took place after all three men had gone to bed. The third man, Paul Simmonds, heard the lounge door open and Mr Henry shouting: 'You won't ever call me 'stupid' again.' Mr Henry then told Mr Simmonds he had killed Mr Rogers. Mr Joyce said scratches were found around Mr Rogers's nipples and in patterns on his arms. They had not been done at the time of the killing but were all examples of sado-masochistic sexual practices.
Mr Henry told his mother at the police station: 'He was not a very nice person at all. In fact he was an evil person . . . This guy has killed other people.'
Mr Henry denies murdering Mr Rogers, from Levenshulme, Manchester.
The trial continues today.