Senate Democrats on Tuesday elected Sen. Brian Schatz of Hawaii as their next whip, the party's second-ranking leadership post, choosing him unanimously to serve as Sen. Chuck Schumer's deputy as Democrats prepare to take control of the chamber in the new Congress.

Schatz ran unopposed for the job and will succeed Sen. Dick Durbin of Illinois, who is retiring from the Senate. The whip's role is to count votes and keep the caucus in line, making Schatz the Democrats' chief enforcer on the floor.

"I love the Senate and am excited to serve both the caucus and the institution in this new capacity," Schatz said in a statement after the vote. "This role will put me in a stronger position to fight for Hawaii, serve my colleagues, stand up for our Democratic priorities, and help deliver real results for working families."

He added that he looked forward to working with the leadership team "to lower costs, hold the administration accountable, and build a stronger future."

Schatz's election came hours after Schumer was re-elected as Senate Democratic leader, defeating Sen. Chris Van Hollen of Maryland 38-12 in the first contested Senate Democratic leadership election since 1994. Schumer, 76, will mark 10 years as the Democrats' Senate leader in January and will serve as majority leader in the next Congress after the party won both chambers in last month's midterm elections.

The leadership votes capped weeks of intraparty tension. Schumer had faced criticism from the party's left since March of last year, when he cut a last-minute deal with Republicans to avert a government shutdown, and dissatisfied Democrats had floated Van Hollen as a challenger during the midterm campaign. Van Hollen congratulated Schumer after the vote and said the two would work together to advance a populist agenda.

President Donald Trump also praised Schumer on Tuesday, saying he "deserves it" and "did a good job," and suggested Democrats in the Senate wanted to make deals on health care and other issues.