WASHINGTON — President Obama’s relations with Democrats on Capitol Hill have never been especially close. But one man is helping to bring them a little closer together: Benjamin Netanyahu.

The decision by the Israeli prime minister to accept an unusual invitation from House Republicans to address a joint meeting of Congress has had the unintended effect of helping the president rally Democrats as his administration negotiates a delicate nuclear deal with Iran.

For months, the issue of imposing sanctions on Iran split many Democrats from the president, as they feared his posture was emboldening the government in Tehran to further develop its nuclear program. But Mr. Netanyahu’s planned speech, a provocation of the president that many Democrats found distasteful and undiplomatic, has helped shift the political dynamic.

“For the prime minister to accept made it extremely political, knowing how the invitation played out,” said Senator Joe Manchin III, Democrat of West Virginia and a frequent critic of the White House. Mr. Manchin was one of 10 Democrats who signed a letter agreeing not to vote on a sanctions bill until after the March 24 deadline to have a framework of an agreement in place with the Iranians.