By Chris Gallagher and Taiga Uranaka

TOKYO (Reuters) - Japanese mining equipment maker Komatsu Ltd has agreed to buy U.S. rival Joy Global Inc for $2.9 billion, its biggest-ever acquisition, to boost its clout in the mining industry.

The deal, worth $3.7 billion when Joy's debt is included, will roughly double the size of Komatsu's manufacturing equipment business and give it access to Joy's underground mining business. Joy has suffered from its significant exposure to North America's coal market, which faces regulatory pressure and competition from cheap natural gas.

Komatsu said on Thursday that it would acquire 100 percent of the Milwaukee-based company for $28.30 per share, about a 20 premium to Wednesday's closing price and an almost 50 percent premium to where the stock has traded in the last three months.

A number of Japanese companies have been taking advantage of a stronger yen to pursue overseas deals. The dollar has fallen 10 percent against the yen this year. Sterling has also slipped. Earlier this week, tech investor SoftBank bought U.K. chip designer ARM in Japan's largest-ever outbound M&A deal.

For Komatsu, acquiring the smaller Joy will help the Japanese equipment maker expand into hard-rock mining for metals such as copper. Komatsu currently produces only surface-mining equipment. Joy also manufactures larger dump trucks - key to cost savings in surface mining.

The deal follows a flurry of consolidation in the sector over the past few years. Demand for mining equipment has tumbled sharply from the commodity cycle's peak five years ago as China and other key markets slowed.

"The mining market is near the bottom now. Now is the good time (to do the acquisition)," Komatsu Chief Executive Tetsuji Ohashi told reporters. "We have solid enough financial soundness to withstand a large scale acquisition."

Komatsu generates annual revenue of more than $17 billion, with just under a quarter of it from mining-equipment sales.

The deal is subject to approval of Joy shareholders and regulatory scrutiny.

Shares of Komatsu in Tokyo ended 2.3 percent higher at 2,082 yen on Thursday, valuing the group at 1.97 trillion yen ($18.4 billion). The deal was announced after the market closed.

Joy shares have risen 86 percent this year, though they are still at around half their price at the beginning of 2015.

Komatsu, which has forecast a fourth straight annual drop in demand for key products this year, said it expects the sector to grow in the long term.

(Story refiles to add dropped word "billion" in second paragraph to clarify deal's value at $3.7 billion including debt.)

(Reporting by Chris Gallagher; Additional reporting by Aaron Sheldrick in Tokyo and Greg Roumeliotis in New York; Editing by Ryan Woo and Steve Orlofsky)