EBay has sent a cease-and-desist letter to Amazon after, it says, it learned the company is using eBay’s seller messaging platform to poach merchants.

The Wall Street Journal reported that the letter was sent to Amazon Monday. EBay claims Amazon is violating California's Comprehensive Computer Data Access and Fraud Act and eBay's user agreement. CNBC reported that the letter also says the "scheme" has been going on for several years.

>> Read more trending news

"We can confirm that we have uncovered an unlawful and troubling scheme on the part of Amazon to solicit eBay sellers to move to Amazon's platform," an eBay spokesman said in a statement to WSJ. "We have demanded that Amazon end its unlawful activity and will take the appropriate steps, as needed, to protect eBay."

Both Amazon and eBay compete as online retailers that rely on independent merchants to sell products on their sites.

In the letter, eBay said it found that about 50 Amazon sales representatives across the world sent more than 1,000 messages to sellers on eBay’s messaging system.

An Amazon spokeswoman said the allegations are being investigated.