The bleary-eyed Democrat told reporters he plans to focus on job creation, health care cost containment and boosting educational opportunities for the underprivileged now that he’s been re-elected.

He said he’s not happy voters approved to eliminate the state alcohol tax, because it will curtail treatment programs, but he said he’s going to have to accept it.

Staffers cheered the governor when he walked into the lobby of his Statehouse office, coffee cup in one hand, a briefing binder under his other arm.

Patrick claimed 49 percent of the vote to Republican challenger Charles D. Baker’s 42 percent. In the process, he became the state’s first two-term Democratic governor since Michael Dukakis was re-elected in 1986.

Patrick said he won a second term because voters were willing to look past the national recession, a vicious campaign and a national Republican tide to focus on his achievements and plans for Massachusetts.

“Tonight, Massachusetts chose to look up and forward, not down and to the past,” he told supporters Tuesday shortly after receiving a concession call from Baker.

“Thanks, especially for making a strong statement that optimism and effort matter, that focusing on the people behind the policy is the right way to move Massachusetts forward,” said Patrick.

Independent Timothy P. Cahill placed third with 8 percent, while Jill E. Stein of the Green-Rainbow Party, finished with just over 1 percent.

Baker failed to convince voters he could turn the state around as he had Harvard Pilgrim Health Care. Nonetheless, he urged his supporters to “get behind the governor and do all that we can to make sure that he succeeds in pulling our economy out of the doldrums and getting it back on the right track.”

Baker also hinted at a future campaign, harkening back to the gubernatorial victories enjoyed by fellow Republicans William F. Weld and W. Mitt Romney despite losing their own first campaigns.

The Republican Governors Association, fearing Cahill would play spoiler in the four-way race, spent millions on ads attacking both Patrick and him. The state treasurer had bolted from the Democratic Party last year and appealed to the same fiscally conservative voters Baker targeted.

The group also sought a trophy pelt by unseating Patrick, who shares an Ivy League background, Chicago roots and political advisers with Obama.

The president was among the first callers to offer his congratulations to Patrick, and the governor said he hoped to use his campaign – especially his heavy grass roots push – as a template for Obama’s own re-election bid in 2012.

Baker attacked Patrick for eight tax hikes – including a 25 percent increase in the state sales tax – and a projected $2 billion deficit. Patrick countered by citing investments in health care, public education and emerging industries such as clean energy and life sciences.

“I think he has done as good a job as could over the last four years,” said William Morgan, 75, a retiree from suburban Wayland. “I think he has managed as well as anyone can.”

Patrick, a 53-year-old married father of two daughters, rose from childhood poverty, attended Milton Academy, Harvard College and Harvard Law on scholarship, and served in the Clinton administration Justice Department.

After a corporate law career, he made his first bid for elective office in 2006 with the help of Chicago political consultants David Axelrod and David Plouffe, who would go on to run Obama’s 2008 presidential campaign. Patrick’s campaign slogan of “Together We Can” presaged Obama’s talk of “Hope.”

After a rocky start triggered by an expensive office redecoration and pricey upgrade to a Cadillac for his official transportation, Patrick settled into the governor’s job but found himself coping with the national recession. A reluctant cost-cutter, he nonetheless trimmed more than $4 billion in state spending and worked with a Democratic Legislature to deliver four on-time budgets.

In seeking re-election, Patrick cast his campaign not as a quest for personal accomplishment but as repayment for his free education.

“I’m grateful, and all I’m trying to do is give back the same better chance that I got,” he said.