NASHVILLE — Hillary Clinton’s defeat last year ignited an intense debate about the role of gender in American politics, but the presidential race overshadowed a deeper structural challenge for Democrats: They have a scarcity of female officeholders in state capitals.

Only two governors and five state attorneys general are Democratic women, an acute problem for a party that counts women as a pillar of its base and trumpets the value of diverse representation.

Moving to address the disparity, the Democratic Attorneys General Association gathered here last week and created a committee of current and former attorneys general and other partners to recruit, train and raise money for female candidates. The project is called the 1881 Initiative, named for the first year that a woman sought, unsuccessfully, the office of state attorney general. (Two did, in California and Illinois.) The goal is to ensure that in five years, at least half of the party’s attorneys general will be women.

“We’re supposed to be living in a representative democracy, and yet the people who hold office don’t reflect the diversity of the population they serve,” said Attorney General Maura Healey of Massachusetts, who is co-chairwoman of the effort. She is one of 22 Democratic attorneys general over all.