Argentina’s Senate has rejected a measure that would have legalized ending a pregnancy during the first 14 weeks for any reason. The Senate voted against the measure 38 to 31 on Thursday. The proposal narrowly passed Argentina’s lower house in July. President Mauricio Macri had promised to sign the bill if it passed, although he is against abortion. Macri called the debate “a win for democracy.” The vote followed intense debate in the Senate that ran into the early morning. Supporters and opponents spent hours outside the Congress building in Buenos Aires to follow the debate. Demonstrations were mostly peaceful. After the vote, small groups of protesters threw firebombs and set barricades on fire, the Associated Press reported. Police used tear gas to break up the crowd, but no injuries were reported.