The House gave final approval to the Senate-passed compromise, ending nearly three decades of congressional inaction.