Bob Swan, then-interim chief executive officer and chief financial officer of Intel Corp., reacts during the inauguration of the company's research and development facility in Bengaluru, India, on November 15, 2018.

Intel said on Tuesday that it's dropping out of the 5G smartphone market just hours after Qualcomm and Apple announced a six-year licensing agreement as part of a royalty settlement.

"The company will continue to meet current customer commitments for its existing 4G smartphone modem product line, but does not expect to launch 5G modem products in the smartphone space, including those originally planned for launches in 2020," Intel said in a statement late Tuesday.

Intel shares rose about 4 percent to $58.97 in extended trading after the announcement. The company said it will provide additional details about its plans in its earnings report on April 25.

In January, Intel named Robert Swan as permanent CEO, ending a months-long search following the ouster of Brian Krzanich. It's up to Swan to find markets that work for Intel as sales of PCs continue to slide. The company said that in addition to exiting 5G smartphones, it's assessing its future in so-called internet of things devices, or the growing number of gadgets that are connected to the web.

In the smartphone market, "it has become apparent that there is no clear path to profitability and positive returns," Swan said in the statement. The company has warned in the past that margins are lower in the device market than in data centers. Intel said it will keep investing in its 5G network infrastructure business.

Earlier in the day, Qualcomm shares surged 23 percent following the disclosure that Apple will pay the chipmaker as part of a settlement. According to Qualcomm, a new license between the two companies is six years, with a two-year option to extend.

Qualcomm is the dominant independent supplier of 5G modems, while Samsung and Huawei make processors for their own devices.

--CNBC's Jordan Novet contributed to this report.

WATCH: Intel shares dip on downgrade from Wells Fargo