Almost two years after the massacre at Sandy Hook Elementary School in Newtown, Conn., Americans' support for gun rights is rising.

By a margin of 52 percent to 46 percent, Americans say protecting the rights of gun owners is more important than gun control, according to a survey by the Pew Research Center released Wednesday. It is the first time Pew found more support for gun ownership than gun control in more than two decades of surveys on the issue.

“Support for gun rights has edged up from earlier this year, and marks a substantial shift in attitudes since shortly after the Newtown school shooting,” the Pew report says. The second anniversary of the massacre is this Sunday.

Right after the mass shooting, in which a gunman killed 27 people and then himself, the balance of opinion favored gun control. But since January 2013, support for gun rights over gun control has risen from 45 percent to 52 percent, while the percentage who prioritize gun control has gone down, from 51 percent to 46 percent.

Among African-Americans, Pew found a dramatic shift in opinion. A majority of blacks, 54 percent, now say gun ownership does more to protect people than to endanger personal safety. Two years ago, only 29 percent of black Americans held that view.

But the portion of the sample identifying as African-American was small: Only 132 out of 1,507 people surveyed were black non-Hispanic, with a margin of error of plus or minus 9.8 percentage points.

Among whites, pro-gun views have also risen, but not as sharply. Some 62 percent now see guns as a protection, up from 54 percent in December 2012, according to Pew. The margin of error for the white sample is plus or minus 3.4 percentage points. The survey was taken between Dec. 3 and 7.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Pew also found that partisan differences over guns have widened in the past two years.

“As was the case in December 2012, a majority of Democrats (60 percent) say guns do more to put people’s safety at risk, while only about a third (35 percent) say they do more to protect people from becoming crime victims,” Pew reports. “By contrast, 8 in 10 Republicans say guns do more to protect people from becoming crime victims, up 17 points from December 2012.”