Comcast and security company Alarm.com have entered into agreements to acquire and divvy up Icontrol, an 11-year-old Internet of Things and home security company founded in Palo Alto and now based in Austin, Texas.

Comcast previously invested an undisclosed sum into Icontrol and relies on the company’s tech to power parts of its connected home and home security platform.

In this multi-part deal, Comcast says it’s buying Icontrol’s Converge platform and wholesale business, which “powers the Xfinity Home touch-screen panel and back-end servers, allowing them to communicate with and manage security sensors in the home, as well as supporting home-automation devices like cameras and thermostat.”

Alarm.com, meanwhile, announced plans this morning to buy Connect, Icontrol’s enterprise home security business, as well as Piper, the camera and security system Icontrol acquired in 2014. Alarm.com priced its end of the deal at “approximately” $140 million.

Comcast says it will continue to run Icontrol’s Converge platform, which is used by other cable companies, and aims to form a new engineering hub in Austin. “Acquiring the company allows us to enter this new business delivering a wholesale platform” (to companies like Cox), said Xfinity Home senior vice president Daniel Herscovici in a call with VentureBeat.

On the nature of the unusual deal, Herscovici said, “For an extremely complicated deal, I think the teams worked well together. It is a testament to the talent at the table.” Herscovici declined to share how much Comcast plans to pay for its portion of Icontrol.

In total, Icontrol says it manages more than 36 million connected devices across its services.

Correction 8:24 a.m. PT: Comcast has not shared how much it’s invested in Icontrol; however, Icontrol has raised more than $100 million to date from Comcast and other investors.