The remark was music to Gov. Andrew M. Cuomo’s ears.

Dan Donovan, who was running for New York attorney general in 2010, said that he did not plan to be known as the “Sheriff of Wall Street,” a sobriquet that Eliot Spitzer earned when he occupied the office.

“What do you mean you don’t want to be the Sheriff of Wall Street?” Mr. Cuomo said during a November 2010 rally. “The job description is, you’re the Sheriff of Wall Street. If you don’t want the job, don’t run for the job.”

That sentiment could come back to haunt Mr. Cuomo’s preferred candidate for the Democratic nomination for attorney general, Letitia James.

Ms. James, the New York City public advocate, said to The New York Times that it was “critically important” that she “not be known as the ‘Sheriff on Wall Street.’” Her remark drew immediate criticism from her Democratic opponents.