After five years of work, a 243-page overhaul of Georgia’s juvenile code passed the state House of Representatives unanimously on Wednesday.

The bill — endorsed by judges, prosecutors, defense lawyers, state agencies and child advocates across Georgia — now moves to the Georgia Senate.

House Bill 641 creates a broad array of programs for neglected children and for children who leave the foster-care system at age 18; strengthens protections for children in juvenile court; clarifies when the state may remove a child from home or seek to terminate parental rights; and adopts best practices from across the country for handling deprivation and delinquency cases.

“People will quite often address us as elected House members and say, ‘Why do you do that? Why do you run for office?” Rep. Wendell Willard (R-Sandy Springs), the bill’s sponsor, told his House colleagues. The answer, he said: “We like to see good policy being made for the people of Georgia. … This is probably one of the more important pieces of policy legislation you will have before you this year.”

A nearly identical version of the bill awaits action by the Senate Rules Committee. One key difference: The Senate version would exempt Georgia’s statewide public-defender system from the responsibility to represent youths facing possible incarceration by a juvenile court judge. The House version would preserve that mandate.

Lawmakers also must sort out how to pay for the costs of the new programs and duties, estimated to be as high as $22 million. Next year’s proposed state budget includes no money for that purpose and, as a consequence, the effective date of the bill has been pushed back to July 2013.