LOS ANGELES — Two female soldiers are suing the Department of Defense and the Army to end policies prohibiting women from serving in a combat role.

Their complaint, filed Wednesday in U.S. District Court for the District of Columbia, alleges that the military is violating the rights of servicewomen by excluding them from certain military positions and from ground combat units because of their gender.

The suit was brought in the name of two women with the help of the Molly Pitcher Project, a group of University of Virginia law students led by professor Anne Coughlin.

“The ultimate objective of the Molly Pitcher Project is to open the profession of combat arms to women on an equal basis to men,” Coughlin said in a news release.

“We want to eliminate this last vestige of formal discrimination against women by the federal government, and ensure that women in the military have the same opportunities and the same obligations as men.”

Lt. Col. Todd Breasseale, a Defense Department spokesman, said the Pentagon does not discuss ongoing litigation, but he said in an email that Defense Secretary Leon Panetta “remains strongly committed to examining the expansion of roles for women in the U.S. military.”

The lawsuit was filed on behalf of Command Sgt. Maj. Jane Baldwin and Col. Ellen Haring, and said their career advancement has been hurt by the current policies.

By being shut out of combat roles, it said, women are unable to serve in some positions, suffer a loss of pay and benefits and eventually promotions.