The marquee race in Massachusetts on Tuesday features two progressive Democrats battling it out to represent John F. Kennedy’s old congressional district, the Seventh, which includes most of Boston, Cambridge and other surrounding towns.

It is one of the last major Democratic congressional rivalries before the November elections and sets up a clash of change versus experience in a restless national political climate that has favored women and underdogs.

In this race, Ayanna Pressley, 44, the first black woman to serve on the Boston City Council, is challenging the incumbent, Michael Capuano, 66, who was first elected in 1998 and has brought home millions of dollars for much-needed projects. Ms. Pressley says she better reflects the district, the only one in Massachusetts in which a majority of residents are nonwhite. The state has never sent a black person to the House of Representatives.