Walmart on Tuesday asked shoppers to stop openly carrying guns into its stores and said that it will end the sale of ammunition for handguns and assault-style weapons.

The company made the changes in response to two deadly shootings that killed 24 people at its stores in El Paso, Texas, and Southaven, Mississippi.

"We know these decisions will inconvenience some of our customers, and we hope they will understand," Walmart CEO Doug McMillon said in a memo sent to employees on Tuesday. "As a company, we experienced two horrific events in one week, and we will never be the same."

A month ago, in El Paso, Texas, a gunman with an assault-style rifle launched a hate-filled attack in our store, shooting 48 people resulting in the loss of 22 innocent lives. Just a few days prior, two of our associates were killed by another associate in our store in Southaven, Mississippi. And hours after the shooting in El Paso, our country experienced another mass shooting in Dayton, Ohio. This weekend brought tragedy to Midland and Odessa, Texas.

In Southaven and El Paso, our associates responded to anger and hate with courage and self-sacrifice. Our immediate priorities were supporting our associates and the impacted families and cooperating with law enforcement. In parallel, we have been focused on store safety and security. We've also been listening to a lot of people inside and outside our company as we think about the role we can play in helping to make the country safer. It's clear to us that the status quo is unacceptable.

After visiting El Paso on Aug. 6, I mentioned that we would be thoughtful and deliberate in our responses. We're ready to share our next steps.

We've been giving a lot of thought to our sale of firearms and ammunition. We've previously made decisions to stop selling handguns or military-style rifles such as the AR-15, to raise the age limit to purchase a firearm or ammunition to 21, to require a "green light" on a background check while federal law only requires the absence of a "red light," to videotape the point of sale for firearms and to only allow certain trained associates to sell firearms.

Today, we're sharing the decisions we've made that go further: 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; We will sell through and discontinue handgun ammunition; and We will discontinue handgun sales in Alaska, marking our complete exit from handguns.

We know these decisions will inconvenience some of our customers, and we hope they will understand. As a company, we experienced two horrific events in one week, and we will never be the same. Our remaining assortment will be even more focused on the needs of hunting and sport shooting enthusiasts. It will include long barrel deer rifles and shotguns, much of the ammunition they require, as well as hunting and sporting accessories and apparel. We believe these actions will reduce our market share of ammunition from around 20% to a range of approximately 6 to 9%. We believe it will likely drift toward the lower end of that range, over time, given the combination of these changes.

As it relates to safety in our stores, 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. We have also had well-intentioned customers acting lawfully that have inadvertently caused a store to be evacuated and local law enforcement to be called to respond. 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.

We believe the opportunity for someone to misinterpret a situation, even in open carry states, could lead to tragic results. We hope that everyone will understand the circumstances that led to this new policy and will respect the concerns of their fellow shoppers and our associates. As it relates to concealed carry by customers with permits, there is no change to our policy or approach. This morning, we briefed your leadership team on how to communicate this change in policy to customers when needed, and they will be sharing that with you very soon. We will treat law-abiding customers with respect, and we will have a very non-confrontational approach. Our priority is your safety. We will be providing new signage to help communicate this policy in the coming weeks.

As an additional step, we commit we will work alongside other retailers to make the overall industry safer, including sharing our best practices. For example, we are exploring ways to share the technical specifications and compliance controls for our proprietary firearms sales technology platform. This system navigates the tens of millions of possible combinations of federal, state and local laws, regulations and licensing requirements that come into effect based on where the firearm is being sold and who is purchasing it. We hope that providing this information, free of charge, will help more retailers sell firearms in a responsible, compliant manner.

Finally, 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. We do not sell military-style rifles, and we believe the reauthorization of the Assault Weapons ban should be debated to determine its effectiveness. We must also do more, as a country, to understand the root causes that lead to this type of violent behavior. Today, I'm sending letters to the White House and the Congressional leadership that call for action on these common sense measures. As we've seen before, these horrific events occur and then the spotlight fades. We should not allow that to happen. Congress and the administration should act. Given our decades of experience selling firearms, we are also offering to serve as a resource in the national debate on responsible gun sales.

We have a long heritage as a company of serving responsible hunters and sportsmen and women, and we're going to continue doing so. Our founder, Sam Walton, was an avid outdoorsman who had a passion for quail hunting, and we're headquartered in a state known for its duck hunting and deer hunting. My family raised bird dogs when I was growing up in Jonesboro, Arkansas, and I'm a gun owner myself. 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. We want what's best for our customers, our associates and our communities. In a complex situation lacking a simple solution, we are trying to take constructive steps to reduce the risk that events like these will happen again. The status quo is unacceptable.