SACRAMENTO, Calif. — A California court ruled last week that Christian Mingle and its affiliate faith-based dating websites must allow “lesbian, gay, bisexual and transgender” singles to search and be matched with people of the same gender.

The ruling comes at the end of a 2.5-year legal battle after two homosexual men noticed in 2013 that new members to the popular dating site, which boasts more than 15 million users, could only search for dates of the opposite sex.

The men filed a lawsuit on discrimination charges against Spark Networks, which owns ChristianMingle and a host of other faith-based dating websites, including Catholic Mingle, J Date (Jewish Date) and LDSSingles.com, the “largest dating site by Mormons for Mormons.”

“Spark has engaged in a systemic and intentional pattern and practice of arbitrary discrimination against gays and lesbians throughout California by denying them full and equal services, accommodations, advantages and privileges in connection with many of its commercial dating services,” the lawsuit filed in 2013 said.

Last week, Judge Jane Johnson of the Superior Court of California in Los Angeles County ruled that Christian Mingle’s policy of only allowing for opposite-sex searches violated a California anti-discrimination law, the Unruh Civil Rights Act, which states that “all business establishments of every kind whatsoever” must treat every person within the jurisdiction as equal, regardless of sex, race, religion, marital status and sexual orientation, among other things.

Judge Johnson approved a settlement of the case, which mandates that Spark must change its policies and websites to better accommodate LGBT individuals. The ruling will affect all dating sites owned by Spark, and changes must be made within the next two years. The J Date site already featured search options for LGBT individuals to find matches.

Spark will also have to pay $9,000 each to Aaron Werner and Richard Wright, the two men who sued the company, as well as $450,000 in attorneys’ fees, as part of the settlement.

After the settlement, Christian Mingle’s homepage now asks users only for their gender. There are currently no options for selecting the desired gender of one’s matches throughout the sign-up process, in filling out a profile or in searching the site for matches once registered, CBC News reports. Further changes to the site’s search options are expected as part of the settlement.