WASHINGTON — Congress appears poised to outlaw revenge porn in the military by the end of the year, after senators included the provision in their draft of the annual defense authorization bill this week.

Similar language was included in the House draft of the budget policy measure earlier this summer. Although technical differences will have to be sorted out as the measure goes through conference committee work, the intention of both chambers on the issue is clear.

“Whether it’s in the barracks or on the internet, degradation and intimidation of our service members is a serious crime that threatens good order and discipline, and we’ve got to give our military the tools it needs to treat it that way,” said Sen. Clare McCaskill, D-Mo., one of the sponsors of the Senate provision.

“This will enable us to better go after these bad actors and ensure justice for victims of these exploitative crimes.”

In March, a story first reported by the website the War Horse about active-duty Marines sharing nude pictures of female colleagues prompted congressional investigations and promises from military officials of a crackdown against sexism and misogyny in the ranks. The work uncovered numerous online sites where pictures were distributed, with hundreds of current and former service members as members.

But few of those involved have faced criminal prosecution. In July, one Marine pled guilty at a summary court-martial to sharing explicit pictures and was sentenced to 10 days’ confinement, a reduction in rank and dismissal from the military.

His punishment appears to be the most severe of anyone involved in the scandal. At least two others have been dismissed from the military, and at least 29 others received lesser punishments.

Outside advocacy groups have attacked the military for too-light handling of the cases, saying the privacy violations amount to serious crimes and devastate unit morale.

Military officials have responded that military regulations at the time did not specify sharing nude photos of colleagues without their permission as a crime, limiting their response options.

Since the spring, all of the services have updated their codes of conduct to better define punishments for the activity.

But the proposed act of Congress would go further. It updates the uniform code of military justice to include criminal charges for anyone who “knowingly and wrongfully broadcasts or distributes an intimate visual image of a private area of another person” without permission, or to “harm substantially the depicted person with respect to that person’s health, safety, business, calling, career, financial condition, reputation, or personal relationships.”

In a statement, Sen. Joni Ernst, R-Iowa, another co-sponsor of the revenge porn provision, called the actions “disgusting” and “simply unacceptable” for troops.

“(This provision) makes it clear that sexual assault, or harassment of any kind, will not be tolerated within our military,” she said. “This legislation holds service members accountable for their actions, and encourages all service members to conduct themselves with integrity and respect.”

The annual defense authorization bill is expected to be finalized later this year. Despite partisan fights on Capitol Hill, the legislation has managed to pass out of Congress each year for more than five decades.