She says she would not do the same today, now that sexual equality and modernity have come even to Albania, with internet dating and MTV invading after the fall of the Berlin Wall. Girls here do not want to be boys anymore. With only Keqi and some 40 others remaining, the sworn virgin is dying out. "Back then it was better to be a man because before a woman and an animal were considered the same thing," says Keqi, who has a bellowing baritone voice, sits with her legs open wide and relishes shots of raki. "Now Albanian women have equal rights with men, and are even more powerful. I think today it would be fun to be a woman."

The tradition of the sworn virgin can be traced to the kanun of Leke Dukagjini, a code of conduct attributed to a 15th century prince and passed on orally among the clans of northern Albania. Under the kanun the role of a woman is severely circumscribed: take care of children and maintain the home. While the life of a woman is worth half that of a man, a virgin's value is the same: 12 oxen. The sworn virgin was born of social necessity in an agrarian region plagued by war and death. If a patriarch died with no male heirs, unmarried women in the family could find themselves alone and powerless. By taking an oath of virginity, women could take on the role of men as head of the family, carry weapons, own property and move freely. They dressed like men and spent their lives in the company of men, even though most kept their female given names. They were not ridiculed but accepted in public life, even adulated.

"Stripping off their sexuality by pledging to remain virgins was a way for these women in a male-dominated, segregated society to engage in public life," says Linda Gusia, a professor of gender studies at the University of Pristina, Kosovo. "It was about surviving in a world where men rule."

Taking an oath to become a virgin should not, sociologists say, be equated with homosexuality, long taboo in rural Albania. Nor do the women have sex-change operations. Keqi, known in her household as "the pasha", says she decided to become the man of the house at the age of 20. Her four brothers had opposed the communist rule of Enver Hoxha, who led Albania for 40 years until his death in 1985, and were either imprisoned or dead. Becoming a man, she says, was the only way to support her mother, her four sisters-in-law and their five children. Keqi lorded it over her large family in her modest house in Tirana, where her nieces served her brandy while she barked out orders. She worked construction jobs and prayed at the mosque with men. Even today, her nephews and nieces say, they would not dare marry without their "uncle's" permission.

When she stepped outside the village, she enjoyed being taken for a man. "I was totally free as a man because no one knew I was a woman," Keqi says. "I could go wherever I wanted to and no one would dare swear at me because I could beat them up. I was only with men. I don't know how to do women's talk. I am never scared." When she was admitted to hospital for an operation, the other woman in her room was horrified to find herself sharing close quarters with someone she assumed was male.

Being the man of the house also made Keqi responsible for avenging her father's death. She says when her father's killer was released from jail five years ago, by then a man of 80, her 15-year-old nephew shot him dead. Then the man's family took revenge and killed her nephew. "I always dreamed of avenging my father's death," she says. "Of course I have regrets; my nephew was killed. But if you kill me I have to kill you." In Albania, a majority Muslim country, the kanun is adhered to by Muslims and Christians. Cultural historians say the respect for medieval customs long discarded elsewhere was a by-product of isolation. But they stress that the traditional role of women is changing.

Some sworn virgins bemoan that. Diana Rakipi, 54, a security guard in the seaside city of Durres, in the country's west, who took the oath to take care of her nine sisters, looks back with nostalgia on the Hoxha era. In communist times she was an army officer, training women as combat soldiers. Now, she laments, women do not know their place. "Today women go out half naked to the disco," she says.

"I was always treated my whole life as a man, always with respect. I can't clean, I can't iron, I can't cook. That is a woman's work." But even in the remote mountains of Kruje, about 50 kilometres north of Tirana, residents say the kanun's influence on gender roles is disappearing. "Women and men are now almost the same," says Caca Fiqiri, whose aunt, Qamile Stema, 88, is the last sworn virgin in his village. "We respect sworn virgins very much and consider them as men because of their great sacrifice. But there is no longer a stigma not to have a man of the house."

Yet there is no doubt who wears the trousers in Stema's one-room stone house in Barganesh, the family's ancestral village. There, "Uncle" Qamile is surrounded by her clan, dressed in a qeleshe, the traditional white cap of an Albanian man. Her only concession to femininity is a pair of pink sandals. After becoming a man at the age of 20, Stema says, she carried a gun. At wedding parties she sat with the men. When she talked to women they recoiled in shyness.

Stema says the oath was both a necessity and a sacrifice. "The truth is I feel lonely sometimes, all my sisters have died, and I live alone. But I never wanted to marry. Some in my family tried to get me to change my clothes and wear dresses, but when they saw I had become a man they left me alone." Stema says she will die a virgin. Had she married, she jokes, it would have been to a traditional Albanian woman. "I guess you could say I was partly a woman and partly a man. I liked my life as a man. I have no regrets." The New York Times