Sen. Elizabeth Warren (D-Mass.) talks to reporters the morning after being silenced in the Senate chamber during the confirmation process for Sen. Jeff Sessions (R-Ala.), President Trump’s nominee for attorney general. (Bill O’Leary/The Washington Post)

A sharply divided Senate confirmed President Trump’s nominee for attorney general Wednesday, capping an ugly partisan fight and revealing how deep the discord has grown between Republicans and Democrats at the dawn of Trump’s presidency.

The day after an unusually tense conflict on the Senate floor, the chamber voted 52 to 47 on Wednesday evening to clear Sen. Jeff Sessions (R-Ala.), whose record on civil and voting rights as a federal prosecutor and state attorney general has long been criticized. Sessions won confirmation almost exclusively along party lines. Sen. Joe Manchin III (W.Va.) was the only Democrat who supported him, and no Republican voted against him. Sessions voted present.

In remarks after his confirmation, Sessions mentioned the “heated debate” surrounding him and said he hoped “the intensity of the last few weeks” would give way to better relations in the Senate.

Trump’s victory came after a bruising confirmation process for Sessions and other Cabinet nominees, which Democrats have used to amplify their concerns about the president’s agenda even as they have fallen short of derailing any nominees.

These proxy battles have generated friction in the traditionally cordial upper chamber, as revealed Tuesday evening when Majority Leader Mitch McConnell (R-Ky.) rebuked Sen. Elizabeth Warren (D-Mass.), accusing her of breaking a Senate rule against impugning a fellow senator’s character and blocking her from speaking for the remainder of the Sessions debate.

(Jenny Starrs/The Washington Post)

In doing so, McConnell asserted his control over a legislative body that is increasingly at risk of veering from normal protocol. But he also sparked a backlash, with accusations of sexism and selective use of an obscure Senate rule bouncing around social media for much of Wednesday.

Ahead of the final vote, Democratic senators arrived one after another in the chamber Wednesday to criticize McConnell, particularly for this statement late Tuesday: “She was warned. She was given an explanation. Nevertheless, she persisted.” Outside the Senate, liberals gleefully thanked McConnell for elevating Warren, one of the Democratic Party’s biggest stars, and handing her a slogan for a potential 2020 presidential bid.

“I think Leader McConnell owes Senator Warren an apology,” Sen. Bernie Sanders (I-Vt.) said in a floor speech Wednesday. He and Democrats were particularly chagrined that a Senate rule could be invoked to block criticism of someone who is up for confirmation before the body.

Warren unleashed a tweetstorm of displeasure following Sessions’s confirmationWednesday night, saying the senator — and the GOP senators who supported him — will hear from her and “all of us” if Sessions makes “the tiniest attempt” to bring “his racism, sexism & bigotry” to the Justice Department. She said all senators who voted to put Sessions’s “radical hatred” into power would hear from the opposition. “Consider this MY warning: We won’t be silent,” Warren tweeted. “We will persist.”

While Democrats couldn’t block Sessions’s confirmation, there may have been other upsides to the fireworks: rallying their liberal base by demonstrating a willingness to fight Republicans and publicly scrutinize Trump’s team.

“We didn’t go into this hoping just to tell a story. We wanted to beat one or two of these nominees,” said Sen. Chris Murphy (D-Conn.). “And it doesn’t look like we’re going to do that. But there’s value in telling the story.”

Sen. Sherrod Brown (D-Ohio) said that the intense focus Democrats put on Sessions will make the public “much more likely to watch to see if he’s independent of the president or just a shill for the president.”

The flare-up over Warren’s remarks began as she attempted to read a statement by Coretta Scott King, the widow of the Rev. Martin Luther King Jr., in opposition to Sessions’s 1986 nomination for a slot as a federal district court judge. The letter accused Sessions of using his role at the time as a U.S. attorney to undermine voting rights.

“Mr. Sessions has used the awesome power of his office in a shabby attempt to intimidate and frighten elderly black voters,” wrote King, who died in 2006.

Several Democrats took to the Senate floor Wednesday to reread a portion of that statement in solidarity with Warren.

“Still banned from floor, but spoke w/ civil rights leaders this AM to say: Coretta Scott King will not be silenced,” Warren told more than 1.8 million Twitter followers Wednesday morning.

Republicans were not happy with Warren’s actions. In an interview on Fox News, Sen. Ted Cruz (R-Tex.) accused his Democratic colleague of advancing false claims about Sessions and sought to remind Americans that Southern Democrats were “the party of the Ku Klux Klan” and spearheaded segregation laws decades ago.

“The Democrats are angry and they’re out of their minds. . . . They’re just foaming at the mouth, practically,” Cruz said.

Cruz once called McConnell a liar on the Senate floor, and he was not rebuked.

Senate Minority Leader Charles E. Schumer (D-N.Y.) argued that Republicans were hypocrites. They had no qualms about silencing Warren, he argued, even as they have declined to rebuke Trump for aggressively lobbing insults at his critics.

“My Republican colleagues can hardly summon a note of disapproval for an administration that insults a federal judge, tells the news media to shut up, offhandedly threatens a legislator’s career and seems to invent new dimensions of falsehood each and every day,” Schumer said. “I hope that this anti-free-speech attitude is not traveling down Pennsylvania Avenue to our great chamber.”

Sen. Tim Scott (S.C.), the Senate’s only African American Republican, offered a deeply personal defense of Sessions, who he said had “earned my support.” Scott read social-media messages he had received arguing that he had let black people down with his support for Sessions. “I left out all the ones that used the ‘n-word,’ ” Scott said in a floor speech to which at least nine of his Republican colleagues came to watch.

Scott said he didn’t take issue with Warren’s attempt to read King’s words, but rather with her reading of a statement by Edward M. Kennedy, the liberal senator from Massachusetts who died in 2009. “The Senate needs to function. We need to have comity in this body,” Scott said.

After his confirmation Wednesday, Sessions recalled saying that Kennedy’s 1986 criticism, which came during his unsuccessful nomination to be a federal judge, “breaks my heart.”

Early Wednesday, McConnell appeared keen on trying to move past the discord, focusing his remarks on the Senate floor on how the chamber had “come together” to approve several of Trump’s Cabinet picks. He singled out Education Secretary Betsy DeVos as an example, even though her confirmation required a rare vote from Vice President Pence to break a tie Tuesday, after two Republicans decided she was unqualified for the job.

“We came together yesterday to confirm Betsy DeVos as secretary of education so she can get to work improving our schools and putting students first,” McConnell said.

Democrats signaled early that the deference normally afforded to senators nominated to the Cabinet was unlikely to be extended to Sessions. Sen. Cory Booker (N.J.), one of two African American Democrats in the Senate, testified against him during a confirmation hearing — marking the first time a senator had done so against a chamber colleague.

Democrats’ concerns about Sessions’s record on civil rights and voting rights coincide with broader concerns about Trump on the same front. They have expressed alarm about Trump’s ban on refugees and foreign nationals from seven predominantly Muslim countries, currently tied up in court, and about his unsubstantiated assertions of massive voter fraud in the election.

Sessions became Trump’s sixth Cabinet-level nominee to win confirmation, putting him well behind the pace of President Barack Obama in 2009. Sessions was the first senator to endorse Trump in February 2016, and his conservative views have shaped many of the administration’s early policies, including on immigration.

In his confirmation hearing last month, Sessions repeatedly vowed to put the law above his personal views. He said he would abide by the Supreme Court decision underpinning abortion rights and a court ruling legalizing same-sex marriage.

Sessions has repeatedly declined to say whether he would recuse himself from an investigation involving Trump associates or possible links to Russia’s interference in the presidential election; he said he would seek the recommendations of ethics officials and “value them significantly” in making a decision.

Sessions’ confirmation leaves a vacancy that will be filled by Alabama Gov. Robert Bentley, a Republican. That term ends in 2018.

For McConnell, a devoted follower of Senate tradition, Tuesday night served as an opportunity to project a restoration of some structure to a chamber that has experienced some chaotic moments of late and is at risk of further disorder.

Democrats have used procedural tactics — including boycotting committee votes — to stall Trump’s nominees, whom they have labeled a controversial lot. Meanwhile, Trump has urged McConnell to dramatically change Senate rules and “go nuclear” if Democrats do not back down from their resistance against his Supreme Court nominee, Judge Neil Gorsuch. The “nuclear option” would entail allowing Gorsuch to be confirmed with a simple majority, rather than requiring a 60-vote threshold to end a filibuster.

McConnell is widely believed to want to avoid eliminating the filibuster, a Senate rule that demands bipartisanship and can serve to strengthen big policy initiatives — and that many view as a bedrock of the upper chamber’s civility. His effort to silence Warren on Tuesday night was seen in some corners as similarly protecting the integrity of the Senate.

“The senator has impugned the motives and conduct of our colleague from Alabama,” McConnell said Tuesday night before setting up roll-call votes on the matter. Republicans agreed, voting 49 to 43 along party lines, that Warren had run afoul of Rule 19 by reading anti-Sessions statements from King and Kennedy.

After the Sessions nomination vote, Republicans moved forward with the confirmation of Rep. Tom Price (R-Ga.), Trump’s nominee for secretary of health and human services, another figure Democrats have aggressively criticized. A final vote on Price was expected to happen early Friday morning.

Paul Kane, Ellen Nakashima, Ed O’Keefe and David Weigel contributed to this report.