The White House — where some aides were caught off guard by the withdrawal — responded harshly to Gregg’s announcement, portraying the New Hampshire Republican as someone who sought the job and then had a “change of heart.”

In a statement, White House press secretary Robert Gibbs said Gregg had “reached out to the president and offered his name for secretary of commerce” — and that he’d promised that, “despite past disagreements about policies, he would support, embrace and move forward with the president’s agenda.”

Obama himself told an Illinois newspaper that Gregg’s withdrawal was “something of a surprise” because the senator had “approached us with interest and seemed enthusiastic.”

Although one White House aide said he was “blindsided” by the news, chief of staff Rahm Emanuel said Gregg signaled to the administration earlier in week that he was having second thoughts and Obama met with him Wednesday at the White House to urge him to stay.

Still, there was no joint statement — as there was when former Sen. Tom Daschle withdrew as Obama’s Health and Human Services nominee — and the tension between the White House and Gregg was clear.