PORTLAND — Riverton Community School will receive $3.4 million in federal funding over the next three years to implement a school improvement plan, the Maine Department of Education announced today.

The department released the funding totals for three of seven schools across Maine that sought a share of $12 million in federal funding after being identified among 10 persistently lowest-performing schools in the state.

Longley Elementary School in Lewiston will receive $2 million over three years and Sumner Memorial High School in Sullivan will receive $1.7 million over three years.

Funding totals aren’t available yet for Deer Isle-Stonington High School, Carrabec High School in North Anson, Lake Region High School in Naples and Livermore Falls High School. according to David Connerty-Marin, Education Department spokesman.

Three schools turned down the money: Houlton High, Hodgdon High and Madison Area High.

To get the money, districts had to submit aggressive, three-year school improvement plans that include replacing the principal if he or she has been on the job for three or more years.

Some principals were already planning to leave their positions, including those at Carrabec and Livermore Falls, Connerty-Marin said.

Others weren’t, including principals at Longley and Lake Region.

Riverton Principal Nancy Kopak was exempt from being removed.

Besides replacing the principal, school improvement plans typically call for more one-on-one instruction for struggling students, extended learning opportunities after school or in the summer, targeted professional development for teachers and administrators, and increased use of test results to improve instruction.