By BRUCE SCHREINER, Associated Press

FRANKFORT, Ky. (AP) — Gov. Andy Beshear spoke against discrimination based on sexual orientation and gender identity and supported a ban on conversion therapy for LGBTQ youth during a historic appearance at a gay-rights rally Wednesday at Kentucky’s Capitol.

Beshear became Kentucky's first sitting governor to attend a rally staged by the Fairness Campaign in the Capitol Rotunda, a few steps from the governor's office. The rallies by gay-rights supporters date back to the 1990s, activists said.

The Democratic governor received loud cheers from the crowd.

“Diversity and inclusion, they aren't buzz words," Beshear said. “They are values. And they are keys to making Kentucky stronger. Kentucky cannot reach its full potential if all of our people don't feel supported to be themselves."

Beshear's appearance was politically courageous, said Chris Hartman, executive director of the Fairness Campaign.

“To have support in the highest office in the commonwealth of Kentucky is so meaningful for so many LGBTQ people who have never felt seen by lawmakers who can make a difference," he said.

Beshear spoke in favor of a so-called “statewide fairness" measure. It would ban discrimination based on sexual orientation and gender identity in employment, housing and public accommodations.

“Discrimination against our LGBTQ brothers and sisters is absolutely unacceptable in this commonwealth," the governor said.

Beshear also endorsed legislation to ban conversion therapy, which attempts to change a person’s sexual orientation or gender identity. He denounced the practice as hurtful and dangerous.

Both proposals face long odds in the Republican-dominated legislature in a state where opposition to gay rights has some deep roots.

In 2004, Kentucky voters overwhelmingly approved an amendment to the state Constitution defining marriage as between one man and one woman. But in June 2015, the U.S. Supreme Court ruled the 14th amendment to the U.S. Constitution guarantees same-sex couples have the right to marry. The ruling overturned same-sex marriage bans nationwide.

A county clerk in Kentucky, Kim Davis, made international news when she was jailed in 2015 for refusing to issue marriage licenses after gay weddings became legal. She cited her religious beliefs and said she was acting under “God's authority."

Davis was released only after her staff issued the licenses on her behalf but removed her name from the form. The state legislature later passed a law removing the names of all county clerks from state marriage licenses.

Gay-rights activists have made headway. Eighteen Kentucky municipalities have passed local “fairness ordinances," which ban LGBTQ discrimination in employment, housing and public accommodations. Those municipalities — including the state's two largest cities, Louisville and Lexington — account for just over a quarter of Kentucky's population, the Fairness Campaign says.

Beshear told reporters Wednesday that he's not worried about political backlash. Attending the rally was “the right thing to do,” he said. The Democratic governor took office in December after defeating socially conservative Republican incumbent Matt Bevin.

At the rally, Beshear praised the activists for making their voices heard.

“You have not been heard nearly enough," the governor said. “Let's make sure that changes this (legislative) session."