BOSTON (AP) — A piece of advice last fall from the nation’s No. 1 political whisperer to a struggling fellow Democrat may have burnished a campaign template this year for nervous incumbents: President Barack Obama told Gov. Deval Patrick to get over his revulsion about asking for campaign cash and start boasting about his record.

That presidential pep talk helped the first-term Democrat revive his flagging re-election bid. Frenetic campaigning across the state and a more assertive approach have turned Patrick from one of the more endangered incumbents into a candidate with a double-digit lead in one poll.

“We worked hard four years ago to change the guard,” Patrick said last month in accepting his party’s gubernatorial nomination. “Now it’s time to guard the change.”

Patrick can also credit a political development beyond his control. He is facing not one but two opponents. State Treasurer Timothy Cahill, a former Democrat, is running as an independent and pursuing the same fiscally conservative supporters targeted by Republican candidate Charles Baker.

Divide the opposition — Patrick hopes it will help him conquer in November.

This weekend, Patrick welcomes governors from across the country to the annual summer meeting of the National Governors Association. His turnaround is certain to capture some of the political talk and perhaps provide some clues to other troubled incumbents looking for ways to survive.

Like Obama, his fellow Chicagoan, Patrick is pinning his hopes for a second term on an economic rebound, lauding 19,000 new jobs in April — even as more than 300,000 in Massachusetts remain unemployed.

“We’ve had our setbacks, thanks mainly to a global economic collapse,” Patrick told the convention delegates. “But unlike many of my predecessors, we didn’t cut and run when the going got tough. We didn’t shrink from the tough calls, if they were the right calls.”

Among Patrick’s supporters is Greg Nuzzo-Mueller.

“He’s not as much of an insider. No matter who’s in the seat, it’s a tough job,” said Nuzzo-Mueller, a 58-year-old nurse.

Patrick was the top civil rights official in the Clinton administration Justice Department, but he had never before run for elective office when he decided to trade his corporate legal work for a gubernatorial campaign in 2006.

He pledged to reduce property taxes, put 1,000 new police officers on the street and expand upon 1990s education reforms. He beat former Gov. Mitt Romney’s running mate, Republican Lt. Gov. Kerry Healey, by 20 percentage points and became only the second black elected governor in the country.

Yet much of his first-term agenda has fallen prey to the national recession, which has triggered a 25 percent sales tax increase instead of a property tax cut. His fellow liberals are also enraged that the state is about to allow casino gambling to raise revenue.

Two troublesome signs remain for Patrick. Despite Obama’s admonition, Baker has far outraised Patrick this year, underscoring the anti-establishment sentiment prevalent in elections across the country this year. Baker, a former budget chief for former Republican Gov. William Weld, had $2.3 million in the bank as of June 15. Patrick had $1.1 million.

Meanwhile, 49 percent of those surveyed by the Boston Globe last month had an unfavorable view of the governor, compared with just 42 percent who held a favorable impression.

Joe Dominico, a state employee out on disability leave, has been underwhelmed by Patrick’s first term.

“It’s like him and the president, they tend to overthink things and not do what’s practical,” said Dominico, 54. “It reminds me of the Dukakis era around here.”

Michael Dukakis served as Massachusetts governor in the 1970s. He was the Democratic presidential nominee in 1988, when he lost in a landslide to George H.W. Bush.

Last October, Obama traveled to Massachusetts to visit MIT. During the limousine ride from the airport, Obama gave Patrick his pep talk. The two also share the same chief political adviser, David Plouffe.

“The campaign Deval Patrick built is the same campaign for change that you and I built across this country,” Obama said in April on another visit for a fundraiser in Boston. “We have begun to solve those problems. The change you fought for is beginning to take hold.”

Today, Patrick has greeted his critics on conservative talk radio and refused to back down from his other opponents, including police officers who have complained about his decision to replace them with civilian flaggers at some road construction sites. The officers are pledging to picket the NGA meetings, which start Friday and run through Sunday.

Patrick also won widespread praise for his calm handling of a pipe break in May that cut off the drinking water supply to Boston for two days.

“He’s finally figured out how to marry the good candidate with the good governor,” said Mary Anne Marsh, a Democratic political analyst. “And he’s got to convince people that if they re-elect him, this is the guy they’re going to get, not the guy they’ve watched the last four years.”

Copyright 2010 The Associated Press.