The nephew of Pakistan cricket legend Imran Khan has apologised after describing a politician as a “faggot” on Twitter.

Hassan Niazi, 25, who was running for student union president at City University, used the slur in an exchange with a friend.

He told the London Evening Standard: “It was taken totally out of context. I didn’t know what the word faggot meant here.

“I was making a joke with my friend on Twitter without hurting anyone. The guy I used it against was a Pakistan politician. There are lots of parodies of him portraying him in a ‘sissy’ way.

“I will never use this word again. I am someone who believes we have to respect everyone and I fight for human rights. If anyone was hurt by the comments, I’m sorry.”

Mr Niazi, who is studying for a masters degree in international human rights and wants to be a human rights lawyer, lost the election by two votes.

In photographs on his Twitter account, Mr Niazi is seen with comedian Russell Brand and his girlfriend and Khan’s ex-wife Jemima Khan.