The Senate confirmed President Obama’s nominee for attorney general Loretta Lynch in a vote of 56-43, Thursday afternoon.

Ten Republicans joined the Democratic caucus in supporting her confirmation: Sen. Kelly Ayotte (R-NH), Sen. Susan Collins (R-ME), Sen. Jeff Flake (R-AZ), Sen. Lindsey Graham (R-SC), Sen. Orrin Hatch (R- UT), Sen. Mark Kirk (R-IL),Sen. Rob Portman (R-OH), Sen. Ron Johnson (R-WI), Sen Thad Cochran (R-MS), Mitch McConnell (R-KY).

Lynch will be replacing outgoing Attorney General Eric Holder. Her confirmation will make her the first African-American woman to hold the position.

Lynch nomination was expected to be close but was not closer than Michael Mukasey’s 2007 confirmation on a vote of 53–40. It was significantly closer than Holder’s 75-21 confirmation vote.

Much of the GOP caucus had voiced concerns about Lynch’s ability to remain an independent voice in the Obama administration, notably pointing to her support for the legal argument behind executive amnesty.

Some argued against her confirmation as a proxy for Obama’s executive actions.

“We are deeply concerned in this country about the president’s executive amnesty, the unlawfulness of it, the breadth of it, the arrogance of it to the point that it’s a direct assault on congressional power and legitimacy, direct attack on laws passed by the peoples’ representatives, and we’ve got a big problem,” Sen. Jeff Sessions (R-AL) argued on the Senate floor Thursday.

“Ms. Lynch has said, flat-out, that she supports those policies and is committed to defending them in court against any complaint about it,” he added.

Democrats argued for her qualifications, intellect, record as a prosecutor, and the historic nature of her nomination.

In debate on the Senate floor, Sen. Claire McCaskill (D-MO) called out the Republican opposition over her support for Obama’s policies.

“If we all adopt that in the future, how is any president elected in this country going to assemble a cabinet?” she said. “Because it will be incumbent on all of us to be against cabinet members who have the nerve to agree with the president who has selected them for their team. It is beyond depressing, it is disgusting.”

Lynch’s nomination had been held up for weeks due a previously stalled human trafficking bill, to which Republican leadership had tied the confirmation vote.

Democrats blocked the initial human trafficking bill due to disagreements over a human trafficking provision in the bill. Both sides reached a deal on the abortion language earlier this week and passed the trafficking bill Wednesday, teeing up the Lynch confirmation.

In the weeks leading up to the vote, Lynch supporters railed against the delay in her confirmation vote, at times even invoking race.

Sen. Dick Durbin (D-IL) charged last month that Senate GOP leadership were delaying her confirmation for no good reason and asking her, the first African American nominated to the position, “to sit in the back of the bus when it comes to the Senate calendar.”

Obama weighed in on the delay last week, calling it “embarrassing.”

“Enough. Enough. Call Loretta Lynch for a vote,” Obama said.