It was terrorism, stupid. And yes, the economy too. Polls showed that a majority of Americans who rejected Democratic Senate candidate Martha Coakley – who? – for Scott Brown, including voters in the deceptively bluer-than-blue state of Massachusetts, thought that President Obama had mishandled both.

That’s not counting the mess the White House made of health care reform, with the help of the Congress, whom he tasked with drafting the package, another inane idea that most experienced politicians would have shunned. However important this issue is to most Americans, health care did not resonate as strongly in Massachusetts. That’s because most people in the state are already covered thanks to a generous state plan. Team Obama has so far satisfied few – not the left, which worked its heart out for him last year hoping for a new economic and foreign policy order, not, obviously, the right, which portrays him as an ideologically motivated, free-spending liberal intent on asserting government control of private industry, and not even the independent-minded center, an ever increasing segment of the voting, and non-voting public.

Mr. Obama’s main accomplishment to date, the $787 billion stimulus package, the size and content of which intensely fought over prior to its unveiling, has turned out to be too small, timid and beholden to the big banks and financial institutions to inspire public confidence. It has fostered a tepid jobless recovery that has not restored confidence in the nation’s economic or political institutions.

Now the president is being inundated with solicited and unsolicited advice about how he should respond to the voter’s repudiation of his policies. There are at least three options being promoted:

First is the ostrich strategy: pretend that Massachusetts is an outlier and proceed full steam ahead with the muddled policies that have puzzled and/or infuriated so many of those who initially supported him.

Second, play to the Democratic party’s base. Seize the populist ground that the tea-partyers have so ably claimed and rail against special interests and politics as usual in Washington.

Third, take the advice of some conservatives and liberals alike – from columnist Peggy Noonan, who wrote Reagan’s best speeches, to Democratic pollster Doug Schoen and Democratic activist Lanny Davis -- listen to the people. Adjust course now or face an electoral tsunami this November.

Since Tuesday's disaster for the Democrats, Obama seems to be pursuing a little of all three courses, lashing out of the banks with Paul Volcker at his side, assailing the Supreme Court decision to remove limits on corporate campaign spending, while quietly acknowledging that the health care bill he promoted, is for the moment, dead in the water.

Obama may now have to confront a basic problem. As E.J. Dionne observed in The Washington Post on Friday, Massachusetts exposed the “core contradictions” in the promises Obama made to American voters in 2008. In Massachusetts, his “commitment to sweeping change” was pitted against his “soothing pragmatism” and disdain for divisive, polarizing public fights. People were frustrated and confused. Scott Brown’s victory was the result. Dionne now wants the president to come out swinging.

But a Senate staff veteran, Janice O’Connell, now a senior vice president of the Gephardt Group, the Washington based, heavily Democratic consulting firm, thinks that the politics of the House and Senate leave him little choice: if Obama wants to accomplish anything, “he will have to figure out a new game plan, one that involves more compromise with Republicans.”

That means that health care reform now may not be feasible. But progress is possible on other fronts, especially on the economy and national security. Some Republicans and self-declared independents like Scott Brown may be willing to work with him on efforts to revitalize the economy and secure the nation against terrorism. In fact, independents like Brown will be looking for ways to polish their newly claimed “independent” status.

It was Obama’s misfortune that the Christmas underpants bomber reminded the people of Massachusetts of the terrorist threat that had not been a priority even six months ago. Having been reminded, however, Obama must get his national security act in order.

For instance, there is no rush to close Gitmo, only to reestablish an expensive new “Gitmo north” in Illinois. Rename the place. Or take in Haitian survivors at the naval base. Nor should Obama send Gitmo’s Yemeni residents home any time soon, given the unrest and political temptations in their homeland. He should tell Dennis Blair, his director of national intelligence, to start connecting those dots, and order his FBI and Justice Department to create those “high-value interrogation teams” he vowed to create months ago to ensure that suspects in terrorism cases will finally be questioned by terrorism experts. And he can move trials of high-value- detainees to military commissions, or at least out of lower Manhattan and the shadow of the still undeveloped World Trade Center site.

The potentially good news for Obama is that despite growing doubts about his leadership style and course, polls show that he personally remains relatively popular. It’s his policies and “direction” people don’t like. Finally, polls show that Americans want him to succeed. He dare not squander more of that good will in the challenging months ahead.

Judith Miller is a writer, Manhattan Institute scholar and Fox News contributor.