WASHINGTON  The Senate voted overwhelmingly Monday evening to confirm Eric H. Holder Jr. to be the new attorney general of the United States. The vote was 75 to 21, with all the votes against the nomination coming from Republicans.

At one time, Republicans indicated that they wanted to give Mr. Holder a rough confirmation ride to signal their political viability at a time when Democrats control the White House and both houses of Congress.

But the effort never gained much traction. Senator Patrick J. Leahy, chairman of the Judiciary Committee, noted Monday that his panel had voted to approve the Holder nomination by 17 to 2, with most Republicans voting in favor.

“That strong, bipartisan vote in favor was a statement that members from both sides of the aisle recognize that Mr. Holder has the character, integrity and independence to be Attorney General,” said Mr. Leahy, a Vermont Democrat. “It is a statement that we all want to restore the integrity and competence of the Justice Department and to restore another critical component  the American people’s confidence in federal law enforcement.”