MEDFORD, Mass. — During Black History Month, Massachusetts likes to point out its reputation as the enlightened 19th-century hub of the abolition movement. The state was one of the first to end slavery, long before the 13th Amendment formally banned it nationwide in 1865.

Less well known is that Massachusetts was the first to legalize slavery, in 1641. Even before then, merchants in the Massachusetts Bay Colony had enslaved Native Americans, and by 1638 were bartering them for Africans in the West Indies. The slave trade grew from there and soon became a pillar of the colonial economy.

Two professors at Tufts University, Kendra Field and Kerri Greenidge, are among the many scholars who have been tracing the history of Massachusetts’s African-American residents, from slavery to Black Lives Matter.

Their research, a collaboration with students and nonprofit organizations, has evolved into what they call the African American Trail Project, a website that maps out more than 200 historic sites across the state.