When Nicholas first came into foster care at age 13, he was scared and anxious. His first foster home was in Bucks County, more than an hour from the Philadelphia neighborhood where he was born and raised. He was separated from his baby brother, who was placed with a different foster family. Then, Nicholas and his brother were moved to the home of a newly licensed lesbian couple in his old neighborhood. "I feel really comfortable here," Nicholas told his foster moms after about a month in their home. He now is able to see his friends, cousins, and brother every day and remain connected to his community.

The Philadelphia Department of Human Services (DHS) stood up for kids like Nicholas when it suspended referrals to two foster care agencies that reportedly deny LGBTQ couples the opportunity to foster parent, pending an investigation by the Philadelphia Commission on Human Relations. In making this move, DHS is rejecting discriminatory practices, for the benefit of foster children.

Catholic Social Services, which has sued the city, can remain open — when it stops discriminating against LGBTQ families. For all youths, but especially for LGBTQ youths, refusing to allow LGBTQ parents to serve as foster and adoptive parents sends the wrong message and denies much-needed familial resources.

>> READ MORE: My faith led me to foster more than 40 kids. Philly is wrong to cut ties with Catholic foster agencies. | Opinion

Pennsylvania, like most states, is facing a foster-care crisis; we do not have enough homes to meet the needs of our abused and neglected children. In fact, Philadelphia is in the midst of a recruiting drive, seeking 300 foster homes for children who could be placed in families but instead are in group care because homes are not available. With so many youths in foster care, we cannot shut the door to anyone who can provide a stable, nurturing home for our most vulnerable children.

Discriminating against prospective LGBTQ foster parents limits the pool of available resources and harms children, who may be placed in foster homes far from their families, separated from their siblings, or assigned to group homes. Catholic Social Services claims that if it chooses to close its doors rather than serve LGBTQ couples, there won't be enough agencies to recruit foster families for children. This claim has no basis in reality. Other states, such as Massachusetts and Illinois, have found that after requiring child welfare agencies to accept all qualified families — including same-sex couples — there were plenty of agencies available to take on the work of those agencies that dropped out.

The problem isn't a shortage of agencies; it's a shortage of families. Allowing agencies to cast aside caring, supportive families only makes matters worse for children in need of a home. Instead, all agencies must denounce discriminatory practices and work with all qualified adults prepared to foster or adopt youths in the foster care system.

Additionally, LGBTQ youths are overrepresented in foster care across the country.  A survey by the Williams Institute found that 19 percent of youths in foster care identified as LGBTQ, compared with less than 10 percent of the general youth population. Many of these youths are in foster care precisely because they were not accepted by their own families, and they end up in group homes at higher rates than their non-LGBTQ peers because there are not enough families willing to take them in.

Government-funded discrimination sends a harmful message to LGBTQ children and families that it is acceptable to exclude them from programs or services based on the provider agency's belief system. This is not only offensive to our core values, it also shrinks the availability of excellent potential foster and adoptive parents.

We support the City of Philadelphia in its decision to reject discriminatory practices by contracting agencies, and urge other jurisdictions to ensure that all children and families are treated equitably and with dignity in the provision of child welfare services. That is what it will take to truly put the needs of children first.

Sue Mangold is the executive director of the Juvenile Law Center. Reggie Shuford is the executive director of the ACLU of Pennsylvania.