Two Massachusetts school districts are among several in five states expanding the school day in an effort to boost student achievement and make U.S. schools more competitive on a global level.

More than 5,000 students in Lawrence and Fall River are among about 20,000 nationwide taking part in a three-year pilot program that kicks in next year.

Schools in Colorado, Connecticut, New York and Tennessee will also participate in the initiative.

Education officials say spending more time in the classroom will give students access to a more well-rounded curriculum that includes arts and music, individualized help for students who fall behind and opportunities to reinforce critical math and science skills.

The long-term hope is to expand the program to include additional schools — especially those that serve low-income communities.