Montana Gov. Steve Bullock will sign into law a bill that decriminalizes gay sex, 16 years after the state supreme court ruled the law unconstitutional.

The bill's passage received an emotional response from gay-rights activists, who have struggled for 20 years to remove the obsolete law.

The bill received the Senate's endorsement earlier in the session with little fanfare, but was stuck in a GOP-controlled House committee until Democrat Bryce Bennett of Missoula led the effort to put the measure to a vote in the House.