Defense Secretary Chuck Hagel meets with Afghan President Hamid Karzai on Sunday. Hagel visited Afghanistan for his first foreign trip as the head of the Pentagon. (Photo courtesy of the Defense Department).

WASHINGTON — Chuck Hagel faced an uphill battle winning confirmation as secretary of Defense, but his first few weeks on the job are proving to be an even bigger challenge.

For his first foreign trip as defense secretary, Hagel headed to Afghanistan where his visit was marred by suicide bombings and harsh comments from Afghan President Hamid Karzai.

On Sunday, Karzai made a statement that seemed to imply the United States is working with the Taliban in orchestrating violence to justify its continued military presence in the country. That came a day after a suicide bomber killed nine outside the Afghan Defense Ministry, a few miles from where Hagel was staying in Kabul. Taliban claimed responsibility for the attack, saying they wanted to send a message to Hagel.

The security concerns forced Karzai and Hagel to cancel a joint news conference, but they met in private Sunday night, before Hagel came back to the United States.

“I told [President Karzai] it was not true that the United States was unilaterally working with the Taliban and trying to negotiate anything,” Hagel said. “Any prospect for peace or political statements — that has to be led by the Afghans. That has to come from the Afghan side.”

The rough trip wasn’t a good start for the former senator from Nebraska who endured a contentious confirmation in the Senate. After a bitter, partisan vote pushed his nomination through the Senate Armed Services Committee, his former Republican colleagues invoked a brief filibuster  to delay the full Senate vote on his nomination.

During the delay, 15 senators signed a letter to President Barack Obama asking him to withdraw Hagel’s nomination.

“It would be unprecedented for a Secretary of Defense to take office without the broad base of bipartisan support and confidence needed to serve effectively in this critical position,” the letter said. “Senator Hagel’s performance at his confirmation hearing was deeply concerning, leading to serious doubts about his basic competence to meet the substantial demands of the office.”

Since the position was created in 1947, no defense secretary has taken office with more than 11 votes against his nomination. Some have been approved unanimously.

Hagel’s lack of support worried some Republicans who said the prolonged confirmation process has weakened his credibility. Sen. John Cornyn of Texas, the No. 2 Republican leader, said it will “make [Hagel] less effective in his job.”

Sen. Roger Wicker, R-Miss., one of the 15 Republicans who asked Obama to pull the nomination, said he still believes Hagel was the wrong choice and “we can do a lot better” in selecting a candidate to head Defense.  “Having said that, the nomination was confirmed, the debate is over, and we all have the same Secretary of Defense.”

Michael O’Hanlon, a senior fellow at Brookings Institution who specializes in U.S. defense strategy, does not believe the confirmation process will haunt Hagel and hurt his credibility in the Pentagon.

“I am not sure the confirmation process will continue to matter that much,” O’Hanlon said. “I believe that the challenges of sequestration, not to mention Afghanistan and Iran and other hotspots, will quickly trump the recent past and the tough slog he had on the Hill.

Hagel’s confirmation battle was unusual for a onetime senator. Typically, nominees who have served in the Senate cruise through their confirmation as a professional courtesy. That stark contrast was evident in the smooth confirmation process for Secretary of State John Kerry, who is the senior Massachusetts senator. It took only two weeks.

Hagel’s nomination had a rocky start. After Obama nominated him in early January, the Nebraska Republican spent weeks meeting personally with senators. Many lawmakers, including Democrats, were troubled by his remark in 2006 when  he said “the Jewish lobby intimidates a lot of people” in Washington.

Democrats said they were reassured after their meetings with Hagel, but his former Republican colleagues were not mollified.  During the Armed Services Committee confirmation hearing, Sen. Lindsey Graham, R-S.C., pressed Hagel.

“Name one person in your opinion who’s intimidated by the Israeli lobby in the United States Senate?” Graham asked.

When Hagel responded he didn’t know, Graham continued: “Name one dumb thing we have been goaded into doing because of the pressure from the Israeli or Jewish lobby?”

Committee members also questioned Hagel on his position on Iran, his comments in which described an ambassadorial candidate as “aggressively gay,” and two taped appearances on the Arabic network Al-Jazeera. Republicans said Hagel seemed unprepared at the hearing.

“His performance before this committee was the worst that I have seen for any nominee for office,” Sen. John McCain, R-Ariz., said.

To his credit, Hagel made his first steps in office count. As defense secretary, Hagel’s first meeting with a foreign counterpart was with Israel’s defense minister, Ehud Barak, a  visit to  Washington last week for the American Israel Public Affairs Committee Policy Conference (AIPAC).

“Secretary Hagel expressed his strong commitment to Israel’s security,” Defense Department Press Secretary George Little said. The two men “agreed that the United States-Israeli defense relationship has never been stronger than during the Obama administration and that both nations will continue this unprecedented close cooperation.”

Back in the Senate, only four Republicans joined the majority when Hagel finally won confirmation in a 58-41 vote  on Feb. 26.

The only nominee who had fewer votes for the nomination is the late John Tower, nominated by former President George H.W. Bush in 1989. The Senate rejected Tower’s nomination, 47-53, due to concerns over issues in his personal life.

Hagel’s toughest challenge is yet to come: how he will deal with the across-the-board spending cuts, known as the sequester, that took effect March 1. On that matter, Congress seems to willing to work with the Pentagon to minimize the impact on national security. The House passed a continuing resolution last week that will fund the defense department at sequester levels, and the Senate will take the spending bill up later this week.

“The defense budget is the place where these arbitrary across-the-board cuts [are] going to hurt the most,” Wicker said. “I’d like to see him immediately have some flexibility given to him by Congress under sequestration. So I’m willing, immediately, to give him wide discretion, along with his generals to move money around under the [spending] caps.”