Attorney General Eric Schneiderman settled with several major big-box retailers for more than $300,000 Monday in an effort to crack down on the sale of toy guns that could be confused with the real thing.

In New York, all toy guns must be marked with orange stripes down the side and have an orange cap. The standard is even stricter in the city, Schneiderman said, in which they have to made out of white, brightly colored, or translucent plastic with a visible company logo or name.

"Year after year, we have found that retailers, such as Wal-Mart, Amazon.com, and Kmart, chose profits over safety and in the process put thousands of New York kids and police officers at the risk of a tragic and even deadly encounter," Schneiderman said. "Guns that do not comply with these standards are very difficult to distinguish from deadly weapons, especially from a distance or when it is dark."

Federal law only requires a toy gun to have an orange cap, he said.

As part of his investigation, which began in December 2014, Schneiderman said they found more than 6,400 prohibited toy guns were sold in the state. The settlement agreement required each company to pay for the prohibited guns it sold online or in stores.

As part of the agreement, Wal-Mart will pay a total of $225,000. Schneiderman said this is the second time Wal-Mart violated a similar agreement, failing to stop selling realistic toy guns after getting caught in 2003.

"Once the New York Attorney General expressed concern with certain items sold at Walmart.com, we blocked the shipment of those items into the state," a spokesman for the company said in an email. "Walmart.com has revised its policy so only items which comply with the New York City code are shipped into New York. We are pleased we were able to resolve this matter, along with several other retailers."

Kmart, the only retailer that sold the toys in their physical New York stores, will pay $64,550, including $50 per gun sold online and $500 per gun sold in store. Amazon.com, which serves as a platform for third-party sellers, will pay $50 per gun sold. Schneiderman said he has sent cease and desist letters to 65 different third-party sellers that sold through the online retail giant.

"We are pleased that we were able to resolve the Attorney General's concerns regarding toy gun sales in a mutually satisfactory way," a spokesman for Sears Holdings, the umbrella company for Kmart, said in an email. "We remain committed to meeting the needs of our many customers and members in New York."

A representatives for Amazon did not immediately respond to a request for comment.

"We're very, very pleased that the big retailers we've dealt with have entered into what should be model agreements for the entire country," Schneiderman said. "The goal is New York City's standard should become a nationwide standard."