NEW YORK -- Mayor Michael Bloomberg testified today against a former campaign operative accused of bilking him out of more than $1 million, with the mayor saying he thought the money was being spent on a poll-monitoring operation and never intended for the consultant to end up with it.

And yes, the billionaire businessman-turned-politician told jurors, the money mattered to him.

"We could have done a lot of good in society" with it, he said. "It's a lot of money."

His demeanor matter-of-fact but wary, Bloomberg answered questions from prosecutors intent on proving that campaign consultant John Haggerty persuaded the mayor and his staff to finance an expansive Election Day initiative that never materialized, then used most of the cash to buy himself a house.

But the mayor also faced more than an hour of sometimes sharp queries from defense lawyers eager to probe into his campaign finances and practices. They aim to paint a picture of a high-rolling candidate surrounded by privileged insiders who skirted ethics rules, threw money at problems and didn't hesitate to bend the law.

Prosecutors do not accuse the mayor of any wrongdoing, and Bloomberg's representatives have said his campaign broke no laws and followed standard practices.

Haggerty presented Bloomberg campaign aides with a budget for a 2009 "ballot security" operation, to be financed through a personal gift from Bloomberg to the Independence Party, the state's largest. The Democrat-turned-Republican-turned-unaffiliated Bloomberg was then running for a third term on the Independence Party, Republican and other lines.

Bloomberg said he never would have donated the money to the party if he had thought it wouldn't be used on a poll-monitoring operation.

"I know exactly what we paid $1.1 million for, and my understand is that we did not receive that service," he said.

He said he thought paying for it through the party instead of as a campaign expense was both legal and proper.

While he acknowledged that his own campaign stood to benefit from the ballot security initiative, "this was for all the candidates of the Independence Party, not just me," he said.

"I didn't think it appropriate to spend campaign money" on it, he said, noting that he made similar contributions to the Republican Party when he ran in 2001 and 2005.

Haggerty, 42, is a veteran of several prominent New York Republican campaigns. As a volunteer on the 2009 campaign of the Democrat-turned-Republican-turned-unaffiliated mayor, Haggerty was the point man on ballot security, a term used mainly by Republicans for poll watching with an eye to preventing voter fraud. Democrats in New York and elsewhere have long said it's a euphemism for suppressing votes, often in minority-heavy precincts.

Bloomberg said his ballot security operation was meant to deploy poll watchers and lawyers to every city voting site "to make sure that people who want to vote and have the right to vote don't get pushed aside."

But Haggerty lawyer Raymond Castello suggested the effort had a different bent, saying Bloomberg had asked Haggerty, "How are you going to keep them from stealing the election?" Bloomberg said he didn't recall such a conversation.

Haggerty lawyers argue that Bloomberg paid for the operation through the Independence Party to distance himself from the practice, especially because state Democrats had complained about his involvement with it in 2005.

"In some periods in our history, in some parts of the country, yes. I don't think so in New York," the mayor said.

Castello also noted that Bloomberg got city term limits changed so he could run again -- something the mayor insisted he did because people asked him to but acknowledged "some people didn't like" -- and his record spending on his self-financed, $109 million third-term campaign.

"You were prepared to spend whatever it took?" Castello asked.

"No. That's not fair to say at all," Bloomberg said.

Haggerty presented Bloomberg campaign aides with a $1.1 million budget that included more than 1,300 paid poll watchers, an office, two-way radios and other expenses, according to prosecution filings and documents aired at the trial. Prosecutors say Haggerty did little of what he promised and used about $750,000 of the money to buy his brother's share of their late father's home.

The defense argues that prosecutors can't prove the money was stolen from Bloomberg because the mayor's donation to the party could not legally be earmarked for a specific purpose.

The trial has offered an unusual peek behind the scenes of the mayor's self-financed campaigns and inside City Hall, as some of his closest aides have answered questions about their relationship with the mayor and how they spend his money. Former Deputy Mayor Kevin Sheekey said on the stand that he didn't enjoy his first two years in office.