Rep. Tim Ryan (D-Ohio) puts his apron on before working the grill at the Polk County Democrats Steak Fry on Sept. 30 in Des Moines. (Charlie Neibergall/AP)

Rep. Tim Ryan, an Ohio Democrat who once held an “A” rating from the National Rifle Association and reaped thousands of dollars in donations from the group, donated a matching sum this week to three prominent gun-control organizations.

“It’s time for Congress to act,” Ryan said in a statement. “We cannot accept the notion that living in America means living with mass shootings as a common occurrence.”

Ryan donated about $20,000, split evenly between Americans for Responsible Solutions, Everytown for Gun Safety and Sandy Hook Promise — groups that advocate expanded background checks and other restrictions that are opposed by the NRA.

Another Democrat who had once been in the NRA’s favor, Rep. Tim Walz (Minn.), also donated a sum matching his past NRA contributions this week. Walz, who is running for governor and was under pressure from a Democratic primary opponent, sent $18,000 to the Intrepid Fallen Heroes Fund, a nonprofit group that helps the families of service members who are killed or severely wounded.

Gun rights groups like the National Rifle Association are loud political lobbyists - until a mass shooting. Here's a look at their responses to tragedies over the years, and their most recent reaction to the shooting in Las Vegas. (Jenny Starrs/The Washington Post)

“I’m doing what I can to get past the political attacks and back to addressing this problem,” Walz said, who also held an “A” rating.

Ryan’s break with the NRA is not new; he supported background-check legislation after the 2012 shooting at Sandy Hook Elementary School in Newtown, Conn., and received no NRA donations afterward. His move to “give back” past donations comes days after a gunman killed 58 by spraying gunfire into a Las Vegas concert venue.

The donations also come as Ryan has made moves to increase his political profile. He led an ill-fated insurgency against House Minority Leader Nancy Pelosi (D-Calif.) last year and recently made political appearances in Iowa and New Hampshire, seeking to burnish his party’s image among white working-class voters.

But in a break from what has been common practice for most centrist Democrats, Ryan endorsed a robust slate of firearms restrictions in announcing his donations Friday.

Congress, he said, can take multiple steps to improve public safety “without infringing on the 2nd Amendment.” Those include, he said, improving the federal background-check system, keeping guns away from stalkers and domestic abusers, and barring those on terrorism watch lists from buying guns. He also called on lawmakers to “raise the standards” for anyone wishing to buy a semiautomatic weapon, which account for the vast majority of handguns sold in the United States and a significant portion of long guns.

“With technology on the market that can cheaply and easily convert a semi-automatic weapon into a fully-automatic machine gun, Congress should require much stricter background checks on semi-automatic rifles and ban the bump stocks that helped make Las Vegas to be so deadly,” he said. “Bump stocks” are an accessory that, law enforcement officials believe, allowed shooter Stephen Paddock to spray machine-gun-like fire on his victims.

The groups that benefited from the donations each publicly thanked Ryan, and Mark Kelly, the co-founder of Americans for Responsible Solutions, told reporters Friday that the gift marked an ironic milestone for his group.

“We just raised money from the NRA,” he said.