Catholic Charities of Buffalo, New York announced last week that it was ending its foster care and adoption program.

The organization said that it reached the decision after a same-sex couple applied to become adoptive foster parents, according to The Buffalo News.

“We're a Catholic organization, so we have to practice what we do consistent with the teaching of the church,” said Dennis C. Walczyk, chief executive of Catholic Charities.

Same-sex couples must be allowed to adopt or become foster parents, New York law states.

“It is with deep sadness we acknowledge that the legacy of the high quality, exceptional services which our staff provides to children and families through foster care and adoption will be lost,” Walczyk said in a statement.

The organization currently has 55 certified foster homes and 34 children placed in 24 of those homes. On average, the organization assists in five adoptions per year.