“He is doing what a leader needs to do,” said Senator Patty Murray of Washington, one of Mr. Reid’s protégées in the Senate, “to move the caucus forward so it stays in tune with where the American people are.”

Mr. Reid, aides said, is also motivated by both the personal angst he felt over the killing of 20 schoolchildren in Newtown, Conn., last year, as well as the anger he feels toward the N.R.A., which was widely expected to endorse him in his 2010 re-election campaign but then declined to do so.

After the Senate returns from its recess next week, it will consider a bill that would expand background checks and increase penalties for so-called straw purchases, in which someone buys a gun for another person who is unable to buy one. Mr. Reid opted not to include in the bill a ban on assault weapons and high-capacity ammunition magazines but plans to hold a separate vote on both measures. His hope was to not let the less popular measures jeopardize passage of the expanded background checks.

Mr. Reid is almost certain to vote in favor of at least some of the new gun safety measures, if not all of them.

It would not be the first time Mr. Reid had shifted his position on a significant public policy issue. For example, in 1993, Mr. Reid co-sponsored legislation that would have stripped the citizen rights from babies born to illegal immigrant mothers, and vigorously denounced immigrants from the floor. The bill did not make it out of the Judiciary Committee.

Just over a decade later, Mr. Reid apologized for the legislation, which he called “the low point of my governmental career,” and became a proponent of the Dream Act, which would give a pathway to citizenship to some children of illegal immigrants. Immigration reform was a centerpiece of his 2010 re-election campaign, against the advice of many of his political strategists.

Similarly, Mr. Reid voted for a 1993 measure that institutionalized the “don’t ask, don’t tell” policy for gay members of the military. But by 2009 he had became an opponent of the policy. That year, Mr. Reid, asked to support a moratorium on the practice, said he would go further and press for its repeal, an offhand statement that ignited the repeal efforts in his chamber.