Apple has agreed to buy the majority of Intel's smartphone modem division, the companies announced on Thursday.

Intel was up more than 6% in after-hours trading. Apple stock was flat on the announcement.

2,200 Intel employees are joining Apple, according to the announcement. Apple paid $1 billion for employees, intellectual property and other equipment from Intel. The deal is expected to close in the fourth quarter of 2019.

"Today we announced the sale of the majority of our 5G smartphone modem business to Apple," Intel CEO Bob Swan said on a conference call discussing company earnings. "This deal preserves Intel access to critical IP we have developed and enables us to focus on the more profitable 5G network opportunity where we are growing and winning share."

Apple currently purchases Intel modems for iPhones, which allow it to connect to networks operated by carriers such as Verizon and AT&T. But in April, Intel announced that it planned to leave the smartphone modem market because Intel had "no clear path to profitability and positive returns," Swan said at the time.

Apple was Intel's only modem customer.

As part of the deal, Intel will be able to develop modems for devices that aren't smartphones, the companies said, including PCs, connected industrial devices and autonomous vehicles.

Goldman Sachs was Intel's advisor on the deal.