WASHINGTON — The top general in the U.S. Armed Forces warned of a crisis of confidence in the growing ranks of women soldiers after a rash of sexual assault cases, which has prompted lawmakers to act.

The warning by Army Gen. Martin Dempsey came hours before President Barack Obama asked military leaders at a White House meeting to get the problem of sexual assaults under control.

“We’re losing the confidence of the women who serve that we can solve this problem,” Dempsey, the chairman of the Joint Chiefs of Staff, said as he returned from NATO meetings in Brussels. “That’s a crisis.”

Obama met with Defense Secretary Chuck Hagel, Dempsey and other military leaders at the White House to discuss sexual assaults after a series of scandals discredited efforts to stamp it out.

A steep rise in sexual assault cases comes just as the Pentagon moves ahead with plans to integrate women into front-line combat roles.

Two cases in as many weeks in which members of the armed forces tasked with preventing sexual assaults have themselves been charged with sex crimes, were the last straw for lawmakers.

News of a third similar case broke shortly after the White House meeting when an Army officer who managed the sexual assault prevention office at Fort Campbell in Kentucky was removed from his job.

Democratic and Republican lawmakers announced legislation that would overhaul the military justice system by taking responsibility for prosecution of most felony-level cases, including sexual assault, away from the chain of command, making it easier for victims to seek justice.

“This epidemic of sexual abuse cannot stand,” said Sen. Susan Collins, R-Maine. A Democratic colleague in the Senate, Kirsten Gillibrand, said the goal was to change the culture in the military.

Obama said armed forces chiefs were ashamed by complaints of unwanted sexual contact in the military, which shot up by more than a third last year.

“They care about this, and they’re angry about it, and I heard directly from all of them that they’re ashamed by some of what’s happened,” he said at the meeting. “They all understand this is a priority and we will not stop until we see this scourge from what is the greatest military in the world eliminated.”

Victims of sexual assault should have no fear of coming forward, and perpetrators should face punishments, Obama said.

The Pentagon has been under increasing pressure to do something about sexual assault. Its annual report on such attacks in the military released last week found that unwanted sexual contact complaints involving military personnel jumped 37 percent, to 26,000 in 2012 from 19,000 the previous year.

However, only 3,374 came forward and reported a crime in 2012, largely due to fears of retaliation and a culture activists say can be geared more toward protecting perpetrators of sex crimes than its victims.

“We are not unpatriotic for bringing this to light,” said Brian Lewis, who was raped by a superior while in the Navy, but ordered not to report it. He did so anyway, and was later misdiagnosed as having a personality disorder and discharged.

Last week, the officer in charge of the Air Force sexual assault prevention office was charged with groping a woman while drunk in a parking lot. And on Tuesday, the Army revealed a sergeant in the sexual assault prevention office at Fort Hood in Texas was also being accused of sex crimes.

In the latest case, the Army said on Thursday Lieutenant Colonel Darin Haas had been removed from his position as program manager of the Fort Campbell office of sexual assault prevention over allegations that he violated a protection order requested by his ex-wife.

“It is clear that something is not working,” said U.S. Rep. Kyrsten Sinema, a Democrat who once worked as a rape crisis counselor.

The Military Justice Improvement Act announced on Wednesday would mean that trained military prosecutors, not commanding officers, would decide whether sexual assault cases should go to trial, according to a group of at least 16 U.S. senators and members of the House of Representatives behind the legislation.

It also would mean commanders cannot set aside the conviction of anyone who has been found guilty of sexual assault or downgrade a conviction to a lesser offense.

Hagel has ordered the retraining and recertification of U.S. military personnel whose job it is to work to prevent sexual assault and assist the victims. The Pentagon has made clear Hagel is open to further actions.

There are nearly 205,000 women in the active duty military, nearly 15 percent of all. When the reserves and guard are included, there are about 360,000 women in the military.

The heads of the different branches submitted their plans to integrate women into front-line combat roles this week. Hagel’s staff is reviewing those recommendations but the secretary himself has yet to see them.