Kroger announced on Thursday that the company is raising its minimum age for gun sales from 18 to 21.

The grocery chain is following in the footsteps of Walmart and Dick's Sporting Goods, which announced similar policy changes on Wednesday.

President Donald Trump has said he would "give very serious thought" to raising age restrictions on at least some kinds of gun purchases.

Kroger is the latest retailer to announce a major change to its firearm sales policies.

The grocery chain is raising the minimum age to buy guns and ammunition from 18 to 21, it announced Thursday. Kroger sells firearms in 43 Fred Meyer stores in Alaska, Idaho, Oregon, and Washington, according to The Wall Street Journal.

Fred Meyer stores will also stop selling assault-style rifles in all locations. Previously, the chain only sold the controversial type of gun in Alaska, having previously stopped sales in other states "several years ago," according to the company.

"Recent events demonstrate the need for additional action on the part of responsible gun retailers," Kroger said in a statement to Business Insider, calling the changes "common sense steps we can take immediately."

On Wednesday, both Walmart and Dick's Sporting Goods announced that shoppers under the age of 21 would be banned from purchasing firearms, following the school shooting that killed 17 people in Parkland, Florida.

Dick's additionally announced that it would no longer sell assault-style rifles, which were previously sold at its hunting and fishing chain, Field & Stream. Walmart stopped selling assault-style rifles in 2015.

President Donald Trump. Alex Wong/Getty Images

Raising the minimum age to purchase firearms has emerged as a policy that President Donald Trump would consider to help reduce gun violence and deaths in the US.

"I'm going to give it a lot of consideration. People aren't bringing it up because they're afraid to bring it up. You can't buy a handgun at 18, 19, or 20. You could buy the weapon used in this horrible shooting at 18," Trump said in a meeting with lawmakers on Wednesday, referring to the Parkland, Florida shooting, according to ABC News. "You are going to decide — the people in this room pretty much — are going to decide. I would give very serious thought to it."

Trump noted that the NRA is opposed to raising the minimum age to buy firearms.

"The NRA is opposed to it and I'm a fan of the NRA," Trump said. "No bigger fan. I'm a big fan of the NRA ... They love our country but that doesn't mean we have to agree on everything."