President Biden signed an executive order that will make sexual harassment in the military a criminal offense, with enforcement to be handled by outside investigators who are independent of the military's chain of command.

"This afternoon, I’m signing an Executive Order to make sexual harassment an offense in the Uniform Code of Military Justice, and to strengthen the military’s response to domestic violence and the wrongful broadcast or distribution of intimate visual images," Biden announced on Twitter Wednesday.

U.S. President Joe Biden speaks while joining the White House Covid-19 Response Team's call with the National Governors Association discussing the Omicron variant in the Eisenhower Executive Office Building in Washington, D.C., U.S., on Monday, Dec. 27, 2021. Biden's medical adviser said a domestic travel vaccination rule should be considered as the omicron variant fuels record Covid-19 case loads in some states and holiday travel continues to be disrupted around the U.S. Photographer: Ken Cedeno/UPI/Bloomberg via Getty Images

President Joe Biden. (Ken Cedeno/UPI/Bloomberg via Getty Images)

Biden's executive order comes over four months after the Pentagon vowed to take action on the recommendations of a commission on sexual assault and harassment in the military, which made 82 recommendations in June aimed at improving how the military handles cases of sexual assault and harassment.

"We're going to make needed foundational investments to support sexual assault accountability, prevention programs, healthy command climates and quality victim care," Hicks said at the time. "To date, sexual harassment and sexual assault remain serious problems in our force, with lethal consequences for our service members and harmful effects on our combat readiness."

The Pentagon is seen from air from Air Force One. (AP Photo/Charles Dharapak, File)

Taking away prosecuting authority from commanders was one of the most controversial recommendations the commission made, with some military leaders debating if it was wise to give officers less control over their units.

CLICK HERE TO GET THE FOX NEWS APP

But the report argued that military commanders do not have adequate experience or training to deal with complaints as sensitive as sexual assault and harassment.

President Joe Biden

President Joe Biden. (AP Photo/Carolyn Kaster) (AP Photo/Carolyn Kaster)

"Commanders are not lawyers, and they do not receive adequate training regarding victimization, implicit bias, and the impact these concepts have on the administration of justice," the report said.