Panasonic is backing out of the consumer smartphone market after years of financial losses and the inability to compete with Apple and Samsung.

The company announced that it will no longer make consumer smartphones in the Japanese mobile market, but will instead outsource production in emerging markets. It says it will continue making business phones.

Panasonic President Kazuhiro Tsuga is working to turn the company around, since it has reported $15 billion USD in losses for the last two financial years combined. He said he's getting rid of any unit that is unable to reach a 5 percent operating margin goal within three years.

"It's not acceptable for the company to be bleeding red ink like this, so we have to think about ways to develop assets that we do have in a more effective direction," said Tsuga.

Tsuga said that Panasonic's mobile business was projected to lose more than $11.02 billion USD for the current financial year ending March 2014.

Panasonic was once a big player in mobile. Back in 2001, it was the second-largest handset maker in Japan with over 19 percent of the market.

But Apple's iPhone and Samsung's Android-powered smartphones have largely taken over, making it difficult for any other companies to compete. Last year, Panasonic had 7 percent of Japanese market share while Apple sat at 25 percent.

To make matters worse, Japan's largest carrier -- NTT DoCoMo Inc -- said it would only promote Sony's flagship Xperia smartphone and the Samsung Galaxy during its summer campaign.

Panasonic certainly isn't the only smartphone maker who is having trouble competing with Apple and Samsung. BlackBerry is in the midst of figuring out how it will restructure its business in response to the lack of enthusiasm for its phones. The company's market share has dropped significantly in recent years, and there are talks of BlackBerry going private and becoming a niche company while selling off other unspecified subsets. T-Mobile even pulled all of its BlackBerry smartphones off its shelves.

Microsoft and Nokia are trying to battle Apple and Samsung, too. In fact, Microsoft just purchased Nokia's Devices and Services division for $7.2 billion USD in an effort to boost Windows Phone.