Senator Elizabeth Warren, whose political future has been the subject of intense speculation, pledged Wednesday that she would not run for president in 2016, her most ironclad statement yet.

“I pledge to serve out my term,’’ which ends in January 2019, Warren said, when pressed during a news conference in Boston with Mayor-elect Martin J. Walsh.

When asked whether she welcomed the speculation about a potential White House run or found it annoying, Warren said it was fine if it would help her advance her populist issues.

“I am not running for president,’’ she said. “I am working as hard as I can to be the best possible senator that I can be and to fight for the things that I promised during my campaign to fight for. I’m fighting for bank accountability. I’m fighting hard to help rebuild america’s middle class and I’m glad to see any possible energy put behind those fights.’’