Stanley Black & Decker (SWK) agreed to sell its hardware and home improvement group on Tuesday to Spectrum Brands (SPB) for $1.4 billion in cash as part of an effort to shed less profitable businesses outside of its core strategy.

The move is an effort by Stanley Black & Decker to strengthen its position as a diversified industrial company while maintaining the assets necessary to benefit from a potential housing market recovery through its $5 billion commercial and do-it-yourself business.

“While HHI is a healthy and profitable business, its characteristics are inconsistent with Stanley Black & Decker’s strategic objectives of diversifying our revenue base through further expansion into targeted end markets with higher growth and margin profiles,” CEO John Lundgren said in a statement.

The business, which has 90% of its operations in North America, recorded revenue last year of $940 million, with 50% derived from U.S. home centers. It provides residential locksets, builder’s hardware and plumbing fixtures under various brands.

Shares of Madison, Wis.-based Spectrum Brand, a maker of consumer products like pet supplies, alkaline batteries and insecticides, climbed more than 14% on the news to an all-time high of $47.59.

The deal is expected to generate after-tax cash proceeds for Stanley Black & Decker of $1.3 billion, more than half of which will be used to repurchase shares, with a smaller portion reducing debt.

The company will reinvest the remaining proceeds along with existing offshore capital to fund the previously announced acquisition of Infastech, which is expected to add to Stanley Black & Decker’s engineered fastening business in Asia.

The agreement, subject to customary closing conditions and regulatory approvals, is slated to close by the first quarter of 2013.

New Britain, Conn.-based Stanley does not expect the purchase to significantly impact its earlier-provided fiscal 2012 guidance.

Follow Jennifer Booton on Twitter at @Jbooton