“We’re not making enough progress in countering retaliation,” Carter said at a Pentagon briefing. “Too many service members feel that when they report or try to stop these crimes, they’re being ostracized or retaliated against in some way.”

Carter said he was issuing a directive for his top military and civilian advisers to devise a strategy for protecting service members who report unwanted sexual contact.

About 22 percent of female service members and 7 percent of male service members experienced some form of sexual harassment last year, ranging from crude jokes to assaults, according to the report.

“That’s abhorrent, and it has to stop,” Carter said.

Carter declined to answer reporters’ questions, but his deputies were at pains to explain what, on the surface at least, appeared to be a contradiction in the study’s central findings: While the number of reported sexual assaults increased in 2014 for the fourth straight year, to 6,131, a survey of troops done in an effort to capture information on unreported sexual assaults suggested that assaults overall had declined.

“We continue to see an unprecedented increase in the reporting of sexual assault from victims, which suggests growing confidence in the department’s response system, and estimates indicate overall occurrences of the crime have decreased since 2012,” said Brad Carson, acting defense undersecretary for personnel and readiness.

Pentagon officials said that extrapolations from the survey of 560,000 active duty and reserve service members set the total number of sexual assaults at 20,300 in 2014. The Pentagon made no such extrapolation last year, but the number of sexual assaults actually reported in 2013 was 5,518.

Forty percent of the women who reported they’d been sexually assaulted in 2014 said they’d also suffered professional retaliation because they’d reported the crime, according to a summary of the report. It did not break down the form of retaliation.

Another 26 percent of women said they felt they had been ostracized by their fellow soldiers because they had reported the crime, the summary said.

The Pentagon has been grappling with the problem of military sexual assault for decades, going back at least 1991, when Navy and Marine Corps aviation officers were alleged to have sexually assaulted 83 women and seven men at a Las Vegas convention in what became known as the Tailhook scandal.

In an effort to counter the problem, military leaders in recent years have punished senior commanders for covering up sex crimes.

Army Secretary John M. McHugh last August demoted a general and forced him to retire over his response to a sexual assault complaint against one of his officers. Maj. Gen. Michael T. Harrison, former commander of Army troops in Japan, was demoted to brigadier general before his retirement.

Nathan Galbreath, senior executive adviser in the Pentagon’s sexual assault prevention office, said the Pentagon believes that victims are more likely to report a sexual assault than they were previously. He said the Pentagon’s surveys suggest that one in four victims is now reporting the crimes, up from one in 10 in 2007, when he joined the office.

“Even with the increase in reporting, though . . . sexual assault remains under-reported, and we encourage any service member who’s experienced a sexual assault to choose a reporting option that’s right for them, to make a report and get the help that they need,” Galreath said.

Among several reasons Galbreath cited for the increased reporting, he said service members can now file “restricted reporting” that enables them to tell superiors about alleged sexual assaults without pursuing criminal prosecution.

Commanders also are now asking those who file reports whether they have experienced retaliation or ostracism, including disparaging social media posts, Galbreath said.

In more than three-quarters of the reported cases, disciplinary action was taken against perpetrators, in most cases including military criminal prosecution.

The Pentagon has set up a toll-free anonymous hotline -- 877-995-5247 -- for anyone who feels they have been the victim of sexual assault by a service member.

Women are five times more likely than men to be sexually assaulted, but the number of male victims is about the same as female victims because 1 million of the nation’s 1.2 million service members are men. About 1 percent of men in the military said they were victims of sexually assault, while 5 percent of woman said so.

“Men that have experienced a sexual assault are more likely than women to describe the event as hazing and nonsexual,” Galbreath said.