The Senate has approved a comprehensive defense bill that would crack down on sexual assault in the military.
The legislation now heads to President Barack Obama for his signature.
The bill would provide $633.8 billion for military personnel, ships, aircraft and bases.
It also would give Obama additional flexibility in deciding the fate of terror suspects at the detention center at Guantanamo Bay, Cuba, but would leave the prison open.
Under the bill, commanders would be stripped of their authority to overturn jury convictions, and victims of sexual assault would be given a legal counsel.