By Dave Sebastian

Google has agreed to buy a 6.6% stake in security-monitoring provider ADT Inc. for $450 million, as part of the search-engine company's effort to bolster its hardware business and capitalize on growth in the market for smart-home security products.

The two companies said Monday they would combine Google's Nest hardware and services with ADT's offerings. ADT sells security and automation systems to help detect intrusion and hazards such as smoke, fire and flooding, and it employs personnel to react to alarms by relaying information to first responders.

ADT expects to offer some Google devices to its customers starting this year, and the companies will debut a jointly developed product in 2021, Jim DeVries, ADT's president and chief executive, told analysts on a conference call. Each company is committing an additional $150 million, subject to certain milestones, for joint marketing and product development, among other initiatives.

The partnership will help ADT compete better in the smart-home market, the company said, adding that it will use transaction proceeds to expand its business and reduce debt. Google said its machine-learning capabilities will support ADT's smart-home offerings, aiming to provide fewer false alarms, more ways to receive notifications and better detection of potential incidents.

ADT shares rocketed nearly 57% in Monday trading, to finish the trading day at $13.48. Google parent Alphabet Inc. shares edged down 0.35% to $1,482.76

Google bought Nest, a maker of internet-connected home electronics, for $3.2 billion in 2014. It renamed the popular Google Home Mini as Nest Mini last year, and the company placed under the Nest name an upgraded mesh router that includes accessories that double as smart speakers.

Google has been investing billions of dollars in recent years to bolster its hardware unit, which had been a laggard among other business segments.

Nest competes with products such as Amazon.com Inc.'s Ring and other tech-enabled home-security devices. But acquisitions such as Nest have contributed to antitrust concerns among critics.

Leaders of Google, Amazon, Facebook Inc. and Apple Inc., grilled on Capitol Hill last week, defended their business practices before Congress, saying they face stiff competition that forces them to serve customers and innovate.

ADT said while it aims to develop products with Google, it will continue to have a relationship with Amazon, with customers being able to integrate their security systems through Amazon's Alexa voice assistant.

Google's stake in ADT will be in the form of a newly created class of stock, though it won't have voting rights to appoint or remove ADT board directors. The transaction is expected to close in the current quarter.

ADT said Monday its losses in the second quarter were roughly flat from the year-ago period, when it reported a $104.1 million loss, and that its monthly performance improved as the quarter progressed. ADT ended the June quarter with about $45 million in cash and cash equivalents, it said.

The company is due to release its full second-quarter financial report Wednesday.

--Michael Dabaie contributed to this article.

Write to Dave Sebastian at dave.sebastian@wsj.com