The two men sat in the state senator’s parked car in suburban Rockland County, but New York City was at the front of their minds and the focus of their conversation.

What the senator, Malcolm A. Smith, wanted to do, the other man explained, was going to cost “a pretty penny.”

“But it’s worth it,” replied Senator Smith, a Democrat, according to a transcript of the January meeting. “Because you know how big a deal it is.”

His plan, described by federal prosecutors in a criminal complaint unsealed on Tuesday, was as ambitious as it was audacious. Mr. Smith was going to bribe his way onto the ballot to run for mayor of New York.