Walmart on Tuesday announced changes to its gun-sales policies and asked shoppers to stop openly carrying firearms in its stores nationwide in response to two deadly shootings at Walmart stores in El Paso, Texas, and Southaven, Mississippi.

The company also said it planned to end the sale of ammunition for handguns and some types of rifles, and it will stop selling handguns in Alaska, the only state where Walmart sells handguns.

"We know these decisions will inconvenience some of our customers, and we hope they will understand," Walmart CEO Doug McMillon said in a memo to employees.

McMillon said he was a gun owner and that the company remained committed to its long heritage of supporting hunters. The company will continue to sell the shotguns and rifles that it carries.

If shoppers openly carry guns into Walmart stores going forward, store managers may ask the shopper to leave and safely secure their gun in their vehicle before returning to the store. The policies will vary by location, however, and shoppers who are openly carrying guns may not always be asked to leave the store, a Walmart spokesman said.

Visit Business Insider's homepage for more stories.

Walmart is barring shoppers from openly carrying guns in its stores and ending the sale of some types of ammunition in response to two deadly shootings at its stores, the company said on Tuesday.

"After selling through our current inventory commitments, we will discontinue sales of short-barrel rifle ammunition such as the .223 caliber and 5.56 caliber that, while commonly used in some hunting rifles, can also be used in large capacity clips on military-style weapons," Walmart CEO Doug McMillon said in a memo to employees on Tuesday.

He said the company would also end the sale of handguns in Alaska — the only state where Walmart sells handguns — and stop selling ammunition for all handguns nationwide.

Read more: Walmart workers grapple with heightened fears in the aftermath of deadly shootings

"We know these decisions will inconvenience some of our customers, and we hope they will understand," McMillon said. "As a company, we experienced two horrific events in one week, and we will never be the same."

Recent shootings at Walmart stores in El Paso, Texas, and Southaven, Mississippi, killed 24 people.

Walmart says changes will halve its share of ammunition sales

McMillon previously said Walmart was responsible for 2% of firearm sales in the US and 20% of ammunition sales. Walmart expects its share of ammunition sales to drop to between 6% and 9% as a result of the newly announced changes. The company will continue to sell the shotguns and rifles that it carries.

"We are trying to take constructive steps to reduce the risk that events like these will happen again," McMillon said.

If you work at Walmart and have opinions or experiences to share, email this author at hpeterson@businessinsider.com.

McMillon also said he sent letters to the White House and Congress encouraging debate around stronger gun-control measures.

"We encourage our nation's leaders to move forward and strengthen background checks and to remove weapons from those who have been determined to pose an imminent danger," McMillon said. "We do not sell military-style rifles, and we believe the reauthorization of the Assault Weapons ban should be debated to determine its effectiveness."

Walmart asks shoppers to stop openly carrying guns into its stores

McMillon said the company was "respectfully requesting" that shoppers stop openly carrying firearms into its stores because of a string of recent incidents involving gun-carrying shoppers that caused store evacuations. The policy change won't affect shoppers carrying concealed firearms.

Read more: 'Customers no longer feel as safe': Walmart employee emails petition protesting gun sales to CEO Doug McMillon

"There have been multiple incidents since El Paso where individuals attempting to make a statement and test our response have entered our stores carrying weapons in a way that frightened or concerned our associates and customers," McMillon said. "These incidents are concerning and we would like to avoid them, so we are respectfully requesting that customers no longer openly carry firearms into our stores or Sam's Clubs in states where 'open carry' is permitted — unless they are authorized law enforcement officers."

Going forward, Walmart store managers will have the discretion to decide how to handle situations where shoppers openly carry guns inside stores, a Walmart spokesman told Business Insider.

Store managers may ask a shopper openly carrying a gun into their store to leave and safely secure their firearm in their vehicle before returning. The policies will vary by location, however, and shoppers who are openly carrying guns may not always be asked to leave the store, the spokesman said.

Read more: Walmart: 'It's time' for Congress to debate an assault-weapons ban

In closing out the memo, McMillon said he owned a gun and that Walmart remained committed to its "long heritage" of "serving responsible hunters and sportsmen and women."

"My family raised bird dogs when I was growing up in Jonesboro, Arkansas, and I'm a gun owner myself," he wrote. "We understand that heritage, our deeply rooted place in America and our influence as the world's largest retailer. And we understand the responsibility that comes with it."

Read McMillon's full memo: