School districts that want to test for lead in their drinking water are getting a $2 million boost from the state.

The funding announced Tuesday will pay for technical assistance to help public schools sample their taps and water fountains. The testing will help identify results that show lead contamination over the federal action level.

Testing will focus on public school water fountains and fixtures used for food preparation.

Republican Gov. Charlie Baker said the goal is to ensure a safe learning environment.

The $2 million will come out of the state's clean water trust and be administered by the Massachusetts Department of Environmental Protection.

The money could help more than 1,700 schools design water sampling programs and assist those schools that test high for lead resolve the problem.