BOSTON — During the 2014 campaign for Massachusetts governor, hundreds of lobbyists donated to the Republican and Democratic candidates – Charlie Baker and Martha Coakley.

Nearly as often as not, those lobbyists contributed to both, according to an Associated Press review of finance reports filed with the state.

Baker and Coakley each raked in more than $40,000 from lobbyists during the hard-fought campaign – tallies that are all the more remarkable given that state campaign finance laws cap annual donations by lobbyists to individual candidates at just $200.

That means the $41,000 Baker raised from lobbyists came from the contributions of more than 200 individuals, each potentially representing a range of clients hoping to get their voices amplified at the Statehouse.

And many of those lobbyists seemed more interested in hedging their bets than which candidate ended up in the corner office. According to the AP review, more than 100 lobbyists opted to write checks to both Baker and Coakley.

The strategy of contributing to multiple candidates in the same race isn’t anything new, according to Pam Wilmot, executive director of Massachusetts Common Cause.

“It’s a trend that’s fairly common here and across the country,” she said. “Lobbyists give because they want access. That means access to whoever is elected and the best way to ensure that is to give to both candidates.”

To be fair, lobbyist donations often account for a small slice of a candidate’s total campaign spending.

Baker, for example, ended up spending the most of any candidate last year – about $5.6 million – followed by Coakley, who reported spending $3.9 million. That doesn’t include the nearly $17 million spent by outside groups, including so-called super PACs.

Baker’s office said residents should not be concerned that lobbyists are trying to buy access.

“Gov. Baker and the administration will continue to govern and make decisions based on the best interests of the Commonwealth becoming a better place to live, work and raise a family,” said spokeswoman Lizzy Guyton.

Baker and Coakley weren’t the only top elected officials pulling in tens of thousands from lobbyists.

House Speaker Robert DeLeo, who has enormous power to push or stall bills at the Statehouse, topped both candidates, collecting more than $47,000 from lobbyists. The Winthrop Democrat faced no primary challenger and handily defeated a Republican opponent in November.

DeLeo’s counterpart at the Statehouse, Senate President Stan Rosenberg, collected less than half as much – nearly $21,000. At the time the Amherst Democrat was the president-in-waiting.

Rosenberg was formally elected to the post in January, replacing former Senate President Therese Murray, who collected about $17,000 in direct lobbyist donations – at a time when she was on her way out of power. A year earlier she’d collected $23,500 from lobbyists.