Friday night in Kingston, and at a house party high up in the hills overlooking the city the first refrains of the dancehall track Tuck in yu belly ring out. Within moments the dancefloor is packed. In the darkened room bodies are locked at the hip, dancers facing each other or pressed front to back, swaying in a musical embrace. Two pelvises joined by rhythm and gyrating in sensual unison. It is as close as you can get to having sex with your clothes on.

This is a scene as Jamaican as a plate of calaloo and salt fish, with one exception: all the revellers are male. There is a reason why this party is up in the hills - it would be too dangerous to stage a gay party in town. There is a reason, too, why we have arrived in a small convoy - for security. One man said he was chased and had his car stoned after he left a gay club. Others tell tales of police stopping cars full of men at night and harassing them with homophobic insults.

And there is a reason too why it is being held in someone's house: there is no openly acknowledged gay social space in Jamaica. Not one bar, nightclub or cafe where same-sex couples can meet openly without the threat of violence.

That wasn't always the case. The country's leading gay activist, Brian Williamson, used to run a club called Entourage. Williamson was the public face of gay rights in the country, the only person willing to go before the cameras or sign his own name to letters to the press advocating gay rights in Jamaica.

Williamson, a co-founder of JFLAG (Jamaica Forum for Lesbians, All-Sexuals and Gays), was an institution - a mixture of elder statesman and older brother to a generation of politicised lesbians and gay men in the country. In May 2003, he wrote to the national newspaper, the Jamaica Observer: "We who are homosexuals are seen as 'the devil's own children' ... and passed by on the other side of the street or beaten to death by our fellow citizens."

On June 9 2004, Williamson was found murdered in his home, the victim of multiple knife wounds to his head and neck. He was 59. With the room ransacked and his safe stolen, police said the motive appeared to be robbery. Campaigners urged them not to rule out the possibility that it was a homophobic attack.

"We don't know why he was killed," says Rebecca Schleifer, of the New York-based Human Rights Watch (HRW), who was supposed to meet Williamson later that day. "Everybody knew who he was and what that meant. That's why it was really important to investigate it thoroughly. Because there are really strong indications that it might have been a homophobic attack."

Eight days earlier, Amnesty International had released a public appeal to the then prime minister, PJ Patterson. The warning: "Jamaica's Gays: Protection from Homophobes Urgently Needed. Gays and Lesbians Are Being Beaten, Cut, Burned, and Shot." Nine days later a mob chased and reportedly "chopped, stabbed and stoned to death" in Montego Bay a man perceived to be gay, according to the HRW report, "Hated to Death: Homophobia, Violence and Jamaica's HIV/Epidemic", written by Schleifer. "Several witnesses [said] that police participated in the abuse that ultimately led to his mob killing, first beating the man with batons and then urging others to beat him because he was homosexual."

Schleifer arrived at Williamson's home not long after the body had been discovered. She found a small crowd singing and dancing. One man called out, "Batty man [derogatory term for a gay man] he get killed." Others were celebrating, laughing and shouting "Let's get them one at a time", "That's what you get for sin". Others sang "Boom bye bye", a line from a well-known dancehall song by Jamaican star Buju Banton about shooting and burning gay men.

"It was like a parade," says Schleifer. "They were basically partying." A few days later the Jamaica Observer ran a letter which read: "To be gay in Jamaica is to be dead."

"Brian's death was a real blow," said Steve Harvey, an outreach worker for Jamaica Aids Support for Life, when I spoke to him in August last year. "It hit home on a personal level because he was a close friend to all of us. But it hit home at a political level, too, because he was such a crucial part of the community."

On November 30, on the eve of World Aids Day, Harvey was murdered. According to eyewitness reports gunmen forced their way into his house and forced him to carry valuables to his car outside. One of the assailants asked Harvey and his two flatmates: "Are you battymen?"

The two flatmates said: "No."

Harvey said nothing.

"I think his silence, his refusal to answer that question sealed it," said Yvonne McCalla Sobers, the head of Families Against State Terrorism. "Then they opened his laptop and saw a photograph of him with his partner in some kind of embrace that showed they were together. So they took him out and killed him."

"Violent acts against men who have sex with men are commonplace in Jamaica," concluded Schleifer's report, which was published in November 2004. "Verbal and physical violence, ranging from beatings to brutal armed attacks to murder, are widespread ... [These] abuses take place in a climate of impunity fostered by Jamaica's sodomy laws and are promoted at the highest levels of government."

In the Amnesty report earlier that year an eyewitness described how a mob in an inner-city area blocked a road to beat a local gay man: "The crowd stood around watching, chanting 'Battyman, battyman, battyman' before gathering around him as he lay on the sidewalk," he said. "The crowd beat, punched and kicked him. They threw water from the gutter and garbage on him, all the while shouting 'Battyman, battyman'. Then they dragged him down the road for half a kilometre. They shouted 'Battyman fi' dead'. As I stood across the street I realised there was nothing I could do to help him. Some mothers were actually in tears at what they were witnessing but there was nothing that they could do either. The crowd was saying, 'Give him to us! Let us kill him! He's a battyman!'" On April 4 a man was chased across the Mona campus at the University of West Indies and injured by a mob for allegedly propositioning a man in the toilets.

Earlier this month the Sunday Herald ran a front page headline "No homos!" in which opposition leader Bruce Golding vowed, according to the paper, that "homosexuals would find no solace in any cabinet formed by him". The statement was supported by several clergyman and a trade union leader. During the 2001 elections Golding's party used as its theme song Chi Chi man by T.O.K. Lyrics, which celebrates the burning and killing of gay men.

Some of the country's most popular musicians have in effect provided a soundtrack for these attacks. Along with Buju Banton, performers such as Capleton and Sizzla have been known to devote whole concerts to lambasting gay men. At one concert in January 2004, a dancehall singer told a crowd of 30,000 in St Elizabeth: "Kill dem battybwoys haffi dead, gun shots pon dem . . . who want to see dem dead put up his hand" (Kill them, the queers have to die, gun shots in their head ... put up your hand if you want to see them dead).

Beenie Man, meanwhile has sung: "I'm a dreaming of a new Jamaica, come to execute all the gays." In 2004, a concert by him in London was cancelled after officers from Scotland Yard stopped him at Heathrow airport to discuss his lyrics. Other dancehall singers have had their concerts cancelled in Europe and North America after protests. A few months later Beenie Man apologised: "While my lyrics are very personal," he said, "I do not write them with the intent of purposefully hurting or maligning others, and I offer my sincerest apologies to those who might have been offended, threatened or hurt by my songs."

Carolyn Cooper, chair of reggae studies at the University of West Indies in Kingston, believes that dancehall has been misunderstood. "It is the music of young, working- class black people and I think that makes it an easy target. Homophobia is one part of dancehall but you shouldn't reduce it to its homophobic lyrics. It's a heterosexual music. It celebrates heterosexuality by denouncing homosexuality. Other types of music, like R&B, celebrate man and woman. Dancehall does the obverse. But I don't think it incites people to violence. I think people understand the power of metaphor."

It is certainly true that gay Jamaicans make the distinction between dancehall music in general and homophobic lyrics of certain performers in particular. "I don't know any gay Jamaicans who don't like dancehall," says Philip Dayle, the Jamaica legal officer at the International Commission of Jurors. But given the literal nature of the discrimination they face they do not regard the most offensive lyrics as metaphorical. "When Boom bye bye comes on, I sit down. I can't dance to that."

"I don't buy that it's a metaphor at all," says Schleifer. "When you get a group of people standing outside [Williamson's] house singing these songs right after he was murdered, they know what they mean."

A lot of people die violent deaths in Jamaica. Last year there were 1,674 murders. That is more than double the UK murder rate in a population less than one-third the size of London. The sources for this violence are many. Both the US and the Eastern bloc armed rival political parties during the cold war with guns that then went to enforce the drugs trade and gang control. Meanwhile Jamaica spends far more servicing debt - much of it foreign - than it does on health, education or policing. Unemployment stands at around 15%; inflation at 12%. In global poverty rankings, Jamaica sits between Syria and Kazakhstan but also has one of the most unequal distributions of wealth in the world. And if the trade subsidies for sugar and bananas are removed, as the World Trade Organisation threatens, the economic situation will rapidly deteriorate.

"In a community without a safety net, the gun represents the safety net," says Sobers. "The gun is power, money and manhood."

Homophobic attacks have to be viewed within that general context. "The victimisation of homosexuals is part of a continuum of violence in Jamaican culture in much the same way that predial larceny (stealing crops) is often punished illegally by angry mobs who take the law into their own hands and lynch the apparently guilty," argues Cooper in her book Sound Clash, Jamaican Dancehall Culture at Large. "Homosexual behaviours, or even the suspicion of intent, do put the individual at risk." So while large numbers of people are vulnerable regardless of their sexual orientation, gays are particularly at risk because of it.

But ignore the economic and historical roots of this violence, say some, and you just find one more way to pathologise Jamaica as a land of yardies, drug mules and bigots. The country certainly gets a bad press. Over the past year articles in the British press that mentioned Jamaica included the word "crime" 240 times and "drugs" 204 times, as opposed to "economy" and "employment", which appeared in just 39 and 16 articles. What we know in the UK about Jamaica stems primarily from what we are told; if we are told only bad things, then inevitably we will gain a bad impression. "Xenophobia is no less a phobia than homophobia. But all phobias are not created equal," writes Cooper.

True, Jamaica has anti-sodomy laws: article 76 of the nation's Offences Against the Person Act criminalises the "abominable crime of buggery" with up to 10 years imprisonment, while article 79 punishes any act of physical intimacy between men in public or private with up to two years in jail and the possibility of hard labour. But there are similar laws in most of the rest of the English-speaking Caribbean and Cuba, not to mention many countries in Africa and Asia.

Indeed, the US supreme court only declared its own anti-sodomy laws unconstitutional in 2003. A year later homophobia was at the centre of US president George Bush's re-election strategy, with Republicans introducing anti-gay marriage amendments in several states.

"Compared to a big city like New York, you could say Jamaica is homophobic," says Cooper. "But not compared to, say, Kansas or smalltown USA. Buju Banton is no less homophobic than George Bush."

So when the issue of homophobia is raised, a tone of defensive nationalism kicks in, even among many Jamaican liberals. "Why us?" they ask. "And why this issue when there are so many?" When the HRW report came out in November 2004 this nationalism turned from defence to attack. The information minister, Senator Burchell Whiteman, said: "We are certainly not about to respond to any organisation external to this country that may want to dictate to us how and when to deal with the laws of our land."

Schleifer argues that such responses are simply a way for Jamaica's political class to avoid the issue. "Jamaica is a vibrant democracy. We are holding them up to standards that they set for themselves. They signed the international covenant of civil and political rights. They didn't have to. And the sodomy laws are colonial themselves. They were imposed by the British on Jamaica and Jamaica decided to keep them."

At the HRW press conference, no gay Jamaican would come forward to speak on the issues for fear of retribution. No straight man would either, for fear that he would be perceived to be gay. In the end, Sobers - a straight Jamaican woman - spoke up. "It was really sad," she says. "But nobody would do it. People are afraid, because of the possible repercussions."

None the less, straight Jamaicans certainly do not see themselves as homophobic. "It's not a question of people going around looking for homosexuals to kill them," says Delroy Chuck, MP for North East St Andrew who many gay activists here regard as an ally. "At the same time there is a general homophobia against people who exhibit homosexual tendencies. I don't think 98% of people in Jamaica think about homosexual activities. Many people know a gay person in their work or in their community. Nobody cares unless they openly exhibit it. That's when people take offence."

For the most part Jamaica seems to function socially on a "Don't ask, don't tell" policy when it comes to sexual orientation. All the lesbians and gay men I spoke to said they believed their sexual orientation was known to their colleagues and family but was neither acknowledged nor discussed.

To navigate this minefield you have to act straight or at least not too gay - keeping your domestic arrangements strictly private and separate from your public life. That is true for gay people in most, if not all, parts of the world, but in Jamaica the stakes are higher. Let your mask slip in the wrong place or at the wrong time and you could find yourself at the mercy of the mob.

"It's a moment-by-moment situation," says Thomas Glave, a professor of English at the State University of New York who was born in the US and raised for much of his childhood in Jamaica. "They might burn your house down. They might smash your window. It might just be gossip. You just don't know. Things are very volatile."

The lesbian experience is neither better nor worse but certainly different. "The abuse against women is a bit more subtle," says one lesbian who did not wish to be named. "There's the rape that you probably never report. The beating from the boyfriend twice removed who's just heard that you're lesbian and has come to whoop your arse."

Either way, there is a premium on the little social space that does exist where gay people can be themselves. Otherwise socialising is divided on class lines. For the gays from uptown (the middle class) there is what has become known as the home entertainment circuit - house parties either in secluded wealthy areas or in homes up in the hills. For gay people who live downtown (the working class), things are more difficult. Without the means to attain the kind of space that will ensure privacy, they are far more vulnerable.

"Middle-class people have options," explains Glave. "They can send children abroad and they have access to information that can help them. But for people who live in poverty things are harder on all fronts."

"Things aren't easy wherever you are," says another lesbian who did not want to be named. "Uptown you still have to deal with your family and you have to live this open secret. But uptown there wouldn't be a community beating. Downtown kills your body. Uptown kills your spirit. I don't know which is worse, to be one of the living dead or to be just dead."

Straddling the divide between uptown and downtown are impromptu club nights that spring up. Sophia of Elite entertainments organises one a month. She gets word out through what she calls a "network" of contacts. Outside, security guards check for knives and weapons; inside, dancehall remains the big draw with moves and outfits far raunchier and flamboyant than you will see on the home entertainment circuit and a few lesbians in the crowd. Sophia says there are no downtown people in her "network" but many come anyway. "I don't advertise in the ghetto because I want people who know how to behave and people who come want to protect their privacy," she says.

Williamson was most definitely from uptown and that, say his friends, was the reason why he was able to be out and forthright. "Brian had a Canadian passport," says Glave. "He owned his own home. He didn't have an employer. He couldn't be evicted. He couldn't be fired. He had somewhere else to go."

Gay rights activists understand the tensions regarding Jamaica's self-image but are reluctant to indulge them. "Whether Jamaica is as homophobic as Kansas or Uzbekistan is irrelevant," says Glave. "We're not full citizens of society."

"These questions highlight the dilemma of the nationalist project. You have to manage very carefully how you use international help," explains Dayle. "But we must start with the universality of human rights. In Jamaica nationalism trumps sexual orientation and race trumps sexual orientation. So when faced with nationalism and race together, issues of sexual orientation don't stand a chance."

But cultural globalisation is also trumping nationalism in positive ways. Cable television has brought accessible and playful scenes of gay life into the home through sitcoms, news and documentaries. For those who can afford it, international travel is also easier, taking gay people to places where they can gain confidence to challenge discrimination when they come home. "You can see young people not putting up with some of the things that we went through," says one lesbian. "They travel more. And with Will and Grace, Queer as Folk and all of that, they see a different way."

While anxieties about the way Jamaica is perceived are valid, says Colin Robinson, executive director of New York's black gay network, the violent nature of homophobic attacks means Jamaica's gay community will inevitably prioritise protection over patriotism. "In order to change the culture you have to love the culture. You've got to address both issues but you can't afford to wait and leave it until some consensus forms because it is not going to happen immediately. But nuance is always a luxury when you're fighting for your life."

Intolerant island? Being gay in Jamaica

'We who are homosexuals are seen as the 'devil's own children' ... and passed by on the other side of the street or beaten to death by our fellow citizens'Brian Williamson, murdered gay activist

'I'm dreaming of a new Jamaica, come to execute all the gays'Beenie Man, dancehall artist

'Compared to a big city like New York, you could say Jamaica is homophobic. But not compared to smalltown USA. Buju Banton is no less homophobic than George Bush'Carolyn Cooper, chair of reggae studies, University of West Indies'From dem a drink inna chi chi (homosexual) bar Blaze di fire mek we dun dem!'Lyrics from Chi Chi man by T.O.K.