When Oscar Wilde noted, "It's an odd thing, but anyone who disappears is said to be last seen in San Francisco," did he mean that the city is a mecca for homosexuals, like himself, in which to lose themselves and, paradoxically, to find themselves?

Wilde probably had something more nefarious, less political in mind. But this seems to be the case for thousands of others, from the gold miners of the 19th century, who wore different-colored handkerchiefs to separate the "male" and "female" roles at their all-male square dances, to the current crop of gay gold diggers, who escape the nation's socially depressed times by moving to the city on the bay. While the gold miners were seeking fortune, the contemporary migrants are seeking freedom and transformation. By changing themselves and their life styles--creating new fashions, spending hours at the gymnasium, renovating crumbling Victorian houses in run-down neighborhoods, setting up bustling businesses on a strip called the Castro--they also have changed the face of San Francisco in recent years, producing an economic renaissance in parts of the city.

Randy Shilts in his provocative "The Mayor of Castro Street"--ostensibly a biography of gay leader Harvey Milk but really a comprehensive history of the homosexual movement in San Francisco--introduces the reader into this born-again world. Here is a boom town that is both carefree and self-conscious, where even the store mannequins have washboard stomachs. In 1976 the police chief estimated that there were 140,000 gay people living in the city, one out of five citizens. Two years later the Los Angeles Times reported that 375,000 people marched in the annual San Francisco Gay Freedom Day Parade.

Too often, however, "the dream of the Castro" had slipped into nightmare with well-documented harassment and beatings by police, random killings by suburban punks, and the inevitable backlash by locals who felt they were being pushed out by this emerging class. It was then that the colorful Harvey Milk--who was assassinated along with San Francisco Mayor George Moscone on Nov. 27, 1978--felt it was time for gays to flex not only their biceps but their political muscle as well.

A former high-school athlete and Barry Goldwater campaign worker, Milk entered local politics at 43 years of age, using his camera shop on Castro Street as a base of operations and an unofficial community center. His politics, an unusual mixture of fiscal conservatism and civil-rights radicalism, intrigued many, but it was his dramatic delivery and highly theatrical presentation (sometimes dressing as a clown, once demonstrating a "pooper-scooper" for TV cameras) that brought him broad attention while often embarrassing moderate gays.

Milk was disdainful of these moderates, who he felt, Shilts writes, "were like so many southern ladies from a Tennessee Williams play, always depending on the kindness of heterosexuals." His umbrella included those on the skids of gay society, embracing transvestites--who lesbians felt were a political liability as a caricature of women--and an uncompromising pack called "Dykes on Bikes." After a series of false starts, Milk's populist views were appealing enough to elect him supervisor of his district. Milk became the first openly gay elected official of any big city in the country and, with his influence in various unions, soon his power extended far beyond his supervisor's seat.

As one gets further along in the book, it becomes clear that Randy Shilts, a prize-winning gay journalist and reporter for The San Francisco Chronicle, is attempting more than a traditional, straightforward biography. In addition to a no-holds-barred character study and a history of the local gay movement, "The Mayor of Castro Street" functions equally well as an investigative piece on the mechanics of big-city government in all of its expedient, back-biting splendor. Shilts pulls off this threefold stunt admirably, juggling his themes, irreverently reporting on how they clashed and played off one another, and often just standing back to watch the fireworks.

Harvey Milk was a mixer, a catalyst who stepped on toes and alienated many in his rise to power. Shilts does not overlook the politician's often petulant ways, sometimes delving wittily into Milk's private life. ("Harvey quickly named one boyfriend 'Taco Bell'; Harvey's friends called him 'the mistake.' ") But the author does not pull any punches celebrating his subject's days in the sun as a behind-the-scenes wheeler-dealer.

Shilts sees Milk as a man in a hurry. The politician predicted his own assassination several times. "I've known it since I was a kid," he once said. "I'll never make it to 50. There's just something sinister down the road." The something sinister appeared in the guise of a fellow supervisor, Dan White, a former police officer who was the only board member to vote against Milk's pet project, a local gay rights bill. When White asked for his seat back after resigning, Milk pressured Mayor George Moscone into appointing someone else. White retaliated by shooting Moscone four times and Milk five times, killing them both. After a weak prosecution, a jury found Dan White guilty on two charges of manslaughter, setting off riots by outraged gays. Milk died six months short of his 49th birthday, fulfilling the prophecy of his childhood.

The account of the murders and their aftermath--written in short, staccato paragraphs with shifting viewpoints--is the kind of splashy journalism strangely appropriate for a biography of a man who treated politics as theater. Milk made three tape recordings outlining his philosophy in case of assassination. From the grave his voice rang out: "If a bullet should enter my brain, let that bullet destroy every closet door." It was a bravura stroke in the final act of a showman who was killed not because of his homosexuality but because he sought power--and power on his own terms.