A bipartisan group of senators had wanted the measure for some time. They finally got it pushed through by attaching it to spending bills that had to pass to avoid a government shutdown.