A 20-year-old Oregon man has sued Walmart Inc and Dick's Sporting Goods Inc. challenging their decisions to stop selling firearms to people under 21 following the Florida high school shooting massacre, an Oregon newspaper reported.

A 19-year-old former student fatally shot 17 people in the deadliest mass shooting at a high school in US history, prosecutors said, using a legally purchased assault-style rifle. The killings inflamed the long-running debate on gun rights, enshrined in the Second Amendment of the U.S. Constitution.

Tyler Watson of Gold Hill, Oregon, filed two lawsuits on Monday in separate state courts in counties after he tried unsuccessfully to buy firearms. He asked the courts to order the retailers to halt the new policies, according to court documents published online by the Oregonian newspaper.

READ: Grief and anger as Florida prepares to bury victims of school massacre

Watson said in a lawsuit filed in Jackson County, Oregon, he tried to buy a .22 caliber rifle at a Dick's Field & Stream store on February 24, four days before the company said it will not sell guns to people under age 21.

He then attempted to purchase a rifle at a Walmart on March 3, according to a lawsuit filed in Josephine County.

Employees at both stores told Watson he could not purchase firearms because of his age. He accused both retailers of violating Oregon's age discrimination law.

"We stand behind our decision and plan to defend it," Walmart spokesman Randy Hargrove said in a statement.

Dick's officials did not respond immediately to a request for comment.

READ: FBI admits failure to act on school massacre gunman, drawing anger

The shooting at Marjory Stoneman Douglas High School in Parkland, Florida, spurred a youth-led wave of protests, demanding that lawmakers in states including Florida raise the minimum age to buy guns of any kind to 21 from 18.

While federal age discrimination laws and those in most states apply only to people over 40, Oregon's law generally prohibits age discrimination against the selling of goods to anyone above the age of 18, said John Donohue, a professor at Stanford Law School.

"It is only because of this unusual state law that there is even an opportunity to bring this claim," he said.

Watson's attorney, Max Whittington, told the Oregonian his client had not planned a lawsuit when he entered the stores.

"He was really just trying to buy a rifle," the newspaper quoted Whittington as saying. "He didn't know about the policy."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.