After squeaking through a brutal confirmation process, Defense Secretary Chuck Hagel is vowing to strengthen America's ties around the globe.

Hagel, who was sworn in Wednesday, also said he would work to ensure U.S. troops and Defense Department workers are treated fairly.

The U.S. Senate confirmed the former Nebraska senator Tuesday in a 58-41 vote.

Four Republicans joined Democrats in backing President Barack Obama's choice for replacing Leon Panetta in the Pentagon's top post.

Although Hagel is a Republican, several senators from his own party voiced strong reservations about his qualifications following unpersuasive testimony during his confirmation hearings.

"There is simply no way to sugarcoat it," Sen. John Cornyn, R-Texas, argued in Tuesday's debate. "Senator Hagel's performance before the Senate Armed Services Committee was remarkably inept, and we should not be installing a defense secretary who is obviously not qualified for the job and holds dangerously misguided views on some of the most important issues facing national security policy for our country."

Democrats read letters from a parade of former defense secretaries and top generals who back Hagel. They said Republicans shouldn't stall on a position as important as the head of the Pentagon, especially with the nation's military facing budget cuts sequestration during a time of war.

"Our men and women in uniform need a Secretary of Defense to lead them through these difficult challenges," Sen. Carl Levin, D-Mich., said. "They need a secretary of defense to defend their interests in the budget battles that we know are about to come. They need a secretary of defense to speak out and ensure that Congress and the country understand the consequences of sequester."

At the heart of the controversy over Hagel are statements he made about Israel and the Jewish lobby in Washington, leading to concerns that he won't give sufficient support to what most senators believe is the strongest U.S. ally in the Middle East.

Some senators also worry that Hagel won't do what it takes to prevent Iran from building a nuclear weapon.

Both Congress and the White House must now face the likelihood that America's adversaries will test an administration whose top defense official is politically weak.

"I like Chuck Hagel as an individual. But the fact is, in modern times, we haven't had one defense secretary that's had more than three votes against him," Sen. Tom Coburn, R-Okla., told Fox News Sunday.

"That sends a signal to our allies as well as our foes that he does not have the broad support in the U.S. Congress, which limits his ability to carry out his job," he added.