When one door closes, a window opens for "The Fosters."

Freeform's award-winning family drama will end after five seasons this summer with a final three-episode miniseries, which will also introduce a spinoff focused on the characters Callie (Maia Mitchell) and Mariana (Cierra Ramirez) as they embark on the next phase of their young adult lives.

The second part of Season 5 premieres January 9.

The show followed a lesbian couple (Teri Polo, Sherri Saum) raising one biological and four adopted children in San Diego. "The Fosters" received praise and GLAAD Awards for its depiction of LGBTQ characters and relationships.

In the spinoff, Callie and Mariana will move to Los Angeles and live together while taking "very different paths" in social work and in the tech industry.

In a statement, creators and exec producers Joanna Johnson, Bradley Bredeweg and Peter Paige said, "It's been the privilege of our lives to get to shepherd this beautiful family through five seasons of love, laughter, heartbreak, tribulation and triumph — and message to the world that DNA doesn't make a family, love does."