The Justice Department cleared Whirlpool's ( WHR) acquisition of Maytag ( MTG) on antitrust grounds Wednesday, sparking significant rallies in both companies' shares.

The action clears the way for Whirlpool to acquire Maytag for about $1.7 billion in stock and cash, creating the dominant global appliance maker. The price comes out to about $21 a share.

"This transaction is not likely to ham consumer welfare," the department said in a release. If the combined company tried to use its market position to raise prices, the result would probably not succeed because of the existence of competitors, the department concluded.

Maytag shares rose $4.73, or 27.7%, to $21.81. Whirlpool gained $6.38, or 7.1%, to $95.95.

More from Markets

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%