It took five grueling months of political battles, but Loretta Lynch has finally been confirmed as the next attorney general. She becomes the first African-American woman to hold the position in U.S. history.

Republicans, who now lead the Senate, refused to have a vote on Lynch until the Democrats agreed to cut language about abortion in an anti-human trafficking bill that had nothing to do with Lynch. Since that legislation was finally passed on Wednesday, the GOP finally agreed to vote on Lynch, five months after President Barack Obama nominated her to replace outgoing attorney general Eric Holder.

CNN reports that the vote was 56-43, with just 10 Republicans joining Democrats. Texas Sen. Ted Cruz did not vote.

Lynch has the experience for the job and was a two-time U.S. attorney for the Eastern District of New York. However, as The New York Times points out, many Republicans didn’t like her support for Obama’s immigration executive actions.

“We do not have to confirm someone to the highest law enforcement position in America if that someone has committed to denigrating Congress,” Alabama Sen. Jeff Sessions said during the vote. “We don’t need to be apologetic about it, colleagues.”

After the vote, Lynch’s father Lorenzo Lynch told the media, “The good guys won. That's what has happened in this country all along. Even during slavery. Levi Coffin was a founder of the Underground Railroad. Even during slavery. A white man fought against slavery. So all over this land good folks have stood in the right lane, in the right path.”

“Today, the Senate finally confirmed Loretta Lynch to be America’s next Attorney General - and America will be better off for it,” Obama said in a statement. “Loretta has spent her life fighting for the fair and equal justice that is the foundation of our democracy.”

for more news, follow Daniel on Twitter