Maryland has been awarded a five-year, $650 million federal grant to try to steer more children out of the state foster-care system, preserve families through community-based support programs, improve child safety and prevent abuse.

The money comes from a block grant program administered by the U.S. Department of Health and Human Services that was created three years ago to allow states more flexibility in how they spend federal foster-care funds.

There are up to 10 grants awarded annually; Maryland is the first state to win a grant this year.

“We can spend on all kinds of different things, including abuse prevention and in-home services,” said Ted Dallas, secretary of the state Department of Human Resources, which is administering the grant. “That flexibility means a lot to us and helps us meet families where they are. That will mean a lot more kids will grow up in families.”

Instead of focusing on removing children from their families because of neglect or abuse, the agency in recent years has tried to work with parents and other adult relatives to prevent dangerous situations, so that children can safely remain at home and in their communities.

As a result, Maryland has seen a major reduction in the number of children placed in foster care or group homes. Since 2007, more than 19,000 youngsters have been adopted, reunited with their families or placed under permanent guardianship.

“While we’ve driven the number of children in foster care down to 27-year lows, we will not rest until every child in our state has a place to call home,” said Lt. Gov. Anthony G. Brown (D) in statement released by the governor’s office.

For the next several months, the state will work with local public, private and faith-based service providers to “recalibrate our services to provide more of the services we think will be more beneficial to children,” Dallas said.

Research has shown that children who have been abused or neglected suffer a second level of trauma when the state intervenes and takes them from their family.

“Before it gets to the point that the child has to leave the home, we would work with the family to remove the risks,” said Carnitra White, the agency’s acting deputy secretary director of programs. “It has been proven to keep kids safer.”

The state foster-care system serves more than 5,000 youths, most of whom are concentrated in Baltimore City and Prince George’s, Baltimore and Montgomery counties.