SanDisk has bought competitor M-Systems for $1.6 billion in an all-stock deal.

The deal values M-Systems shares at $36, a 13-percent premium. SanDisk said it's also a 26 percent premium over the average closing price of M-Systems' shares for the last month.

SanDisk said it is acquiring the Flash memory competitor because it leads in the mobile, portable and embedded markets. Short-term advantages include making SanDisk more competitive in the mobile phone market, while in the long term the company hopes to gain research and development benefits from the deal, it said.

M-Systems makes a range of flash-memory based products including the U3 smart drives, high-density SIM cards for cell phones, embedded flash drives for phones and other devices and memory cards. SanDisk is a major manufacturer of flash memory cards for use in consumer electronics products.

The deal is subject to approval by regulators in both the US and Israel and is expected to close by the end of the year, SanDisk said, after which it intends to make M-Systems a subsidiary.