The highly politicized five-month battle to choose President Barack Obama’s next attorney general came to a close Thursday when the Senate finally voted to confirm Loretta Lynch. The 56-43 vote makes Lynch the first African-American female attorney general in U.S. history.

But the delay of her nomination neared record-breaking proportions. Republicans leading the Senate refused to bring her nomination up for a vote until Democrats cut a deal on abortion language in an unrelated bill. That legislation passed Wednesday, setting up Thursday’s vote and ending the latest partisan Washington standoff.