CINCINNATI (AP) _ About 150 demonstrators gathered outside a courthouse today to support an art gallery and its director facing obscenity charges for showing an exhibit of Robert Mapplethorpe's photographs.

Jury selection began this morning in the trial of the Contemporary Arts Center and Dennis Barrie.

Municipal Judge David Albanese rejected the defense's request to question potential jurors individually.

The case has become a rallying point for artists, First Amendment activists and those who believe the indictments are part of a wider effort to intimidate homosexuals.

''We think the prosecution is motivated by homophobia,'' said Scott MacLarty, spokesman for the Gay-Lesbian March Activists. ''We think it is motivated by hatred for artists.''

MacLarty was among about 150 people who gathered outside the Hamilton County Courthouse to demonstrate against prosecution of the gallery. About 50 police officers patrolled on foot, on horseback and on motorcycles.

Demonstrators shouted ''Who's our Hero, Dennis Barrie; Who's the Crook, Simon Leis.'' Leis, Hamilton County sheriff, stood on the courthouse steps with other police officers and smiled.

MacLarty told the crowd that Leis was on ''a personal crusade above and beyond the law in a personal vendetta against gay and lesbian people and artists.''

Frank Weikel, spokesman for the sheriff, said, ''We're not surprised. Leis- bashing is nothing to him or us.''

Monty Lobb Jr., president of Citizens Concerned for Community Values, an anti-obscenity activist group in Cincinnati, said the Mapplethorpe prosecution is necessary in order to safeguard the community's moral standards.

''People should understand Cincinnati. The material that's been indicted and is before the court now, there's nothing like that available in Cincinnati. You don't have it in videotapes, you don't have it in magazines, books - nothing here in Cincinnati,'' Lobb said in an earlier interview. ''To say nothing about it would be a form of acceptance. We don't want that. The people don't want that.''

The seven-week exhibition of photos by Mapplethorpe, who died of AIDS in 1989, drew a record crowd of more than 80,000 to the gallery last spring.

But a grand jury indicted Barrie and the gallery, concluding that seven of the 175 photos violated community standards. One photo shows a man urinating into another man's mouth. Others show oral sex and anal penetration with objects.

Barrie, 43, and the gallery are charged with pandering obscenity and with using children in nudity-related material. The second charge stems from two photos, one of a boy and one of a girl, their genitals exposed.

If convicted, Barrie could get up to six months in jail and a $1,000 fine on each count. The gallery could be fined $5,000 on each count.

Albanese earlier ruled each photo can be considered separately. He rejected defense arguments that the entire exhibit be considered as a whole, including Mapplethorpe's portraits and floral studies.

Defense lawyers have argued that the gallery is a museum and is thus protected from obscenity laws. But Albanese said the Contemporary Arts Center does not fit the definition of a museum, since it has no permanent collection.

The exhibit was canceled at the Corcoran Art Gallery in Washington last year because of a furor over government funding of art deemed obscene.

The National Endowment for the Arts has since adopted a policy requiring grant applicants to certify their awards will not be used for work that might be deemed obscene. Sen. Jesse Helms, R-N.C., had pressed for the policy.

The Mapplethorpe exhibit has appeared in several U.S. cities without incident. It is on display now at the Institute for Contemporary Art in Boston. Barrie, who has been director of the Contemporary Arts Center since 1983 and holds a doctorate in American cultural art from Wayne State University, has said the indictments reflect the thinking of a small group of conservatives.

''I think these are all attempts to limit the First Amendment. It scares some of these groups who want only one point of view - their point of view,'' he said.