ELIOT — Some children in a New Hampshire town will soon start attending school across the state line in Maine.

Officials in Rollinsford, N.H., have reached an agreement to send students to Marshwood middle and high schools across the border. Marshwood serves the Maine towns of Eliot and South Berwick.

Under the deal expected to start next year, Rollinsford will pay the Maine school district about $1.7 million in annual tuition.

Rollinsford has its own elementary school, but for decades has been sending middle and high school children to Somersworth, N.H.

Marshwood Middle School Principal John Caverly told WMTW-TV he expects a smooth transition because many of the kids know each other already through shared youth programs.

Rollinsford children who currently attend Somersworth schools will be allowed to continue to do so.