The acquisition -- assuming it wins the backing of shareholders -- will be the largest overseas purchase by a Japanese company and propel Takeda, led by Frenchman Christophe Weber, into the top 10 rankings of global drugmakers.
The tie-up crowns a hectic few months of M&A activity as big drugmakers look to improve their pipelines by bringing in promising medicines developed by younger companies.
The enlarged group will be a Japanese national champion in pharmaceuticals and a leader in gastroenterology, neuroscience, oncology, rare diseases and blood-derived therapies, used for serious conditions such as hemophilia.
The agreement came on the last day for Takeda to make a firm bid. Shire had rejected four previous offers, due to price concerns and the fact that the Japanese company is proposing to pay for much of the acquisition in stock.
The final deal is approximately 46 percent cash and 54 percent stock, leaving Shire shareholders owning around half of the combined group.
Shire investors will receive $30.33 in cash and either 0.839 new Takeda shares or 1.678 Takeda American depositary shares for each share, the companies said, valuing the offer at 48.17 pounds a share based on the latest price and exchange rate.
That is a 60 percent premium to the price before Takeda first declared its interest six weeks ago.
Shire's shares were trading 4 percent up on the previous close at just over 40 pounds by 1000 GMT, still well under the agreed price and indicating that some uncertainty remains.
"I think it is a good deal for Shire shareholders but not everybody may think that. However, the risk is that if shareholders vote this down then the shares are going to go down a lot," said Polar Capital fund manager Dan Mahony, who owns both Shire and Takeda stock.
The deal must get the support of 75 percent of Shire's voting shareholders. While some of them do not want to hold Takeda paper, Weber told reporters he believed investors would back the transaction.
"Their board and our board is confident that both shareholders will see the benefit of the acquisition," he said.
Jefferies analysts said they expected the shares to trade at a relatively wide discount to the offer, given investor unease over the large stock component and the fact that the deal is not expected to close until the first half of 2019.
The deal also needs two-thirds approval from Takeda shareholders.
Weber became Takeda's first non-Japanese CEO in 2015 and has been hunting for acquisitions to make the company more global and reduce its exposure to a mature Japanese pharmaceutical market.
Prior to his arrival, Takeda bought Nycomed for $14 billion in 2011 in its previous biggest deal. Last year Weber bought U.S. cancer specialist Ariad Pharmaceuticals for $5 billion.
Buying Shire is a big financial stretch for Takeda but Weber believes it will generate substantial cash flow, enabling the enlarged group to pay down its borrowings quickly.
Takeda said $30.1 billion in bridge loan financing would be replaced with a combination of long-term debt, hybrid capital and available cash ahead of completion, without providing a breakdown.
The Japanese company predicts annual cost synergies of at least $1.4 billion three years after completion and the deal is expected to boost underlying earnings significantly from the first full year after closing.
Jobs will go, with the group's combined 52,000 workforce likely to be reduced by 6-7 percent. The companies have a number of commercial, research and manufacturing overlaps, particularly in the United States.
Takeda said it would maintain its global headquarters in Japan and evaluate consolidating Shire's operations into Takeda's in the Boston area, Switzerland and Singapore.
Weber argued Takeda would be able to maintain its investment grade credit rating with a target of achieving a net debt to EBITDA ratio of 2.0 times or less in the medium term.
"The commitment to get down to two times EBITDA in three to five years really shows how cash-generative Shire is," said Polar Capital's Mahony.
Some analysts have suggested Takeda could sell off certain Shire businesses to make the deal more manageable but Weber said gastroenterology, neuroscience, oncology, rare diseases and blood products were all important areas to be retained.
There may, however, be opportunities to divest certain medicines falling outside these fields.
"There is 25 percent (of the portfolio) which is more isolated products. Some are doing very well, some less well. That's where you could have some portfolio assessment and potentially some disposals," Weber said.
Shire said last month it would be willing to recommend an offer from Takeda after it rejected four previous approaches.
The company traces its roots back to 1986, when it began as a seller of calcium supplements to treat osteoporosis, operating from an office above a shop in Hampshire, southern England. Since then, it has grown rapidly through acquisitions to generate revenues of about $15.2 billion last year.
But it has been under pressure in the past 12 months due to greater competition from generic drugs and debt from its $32 billion acquisition of Baxalta in 2016, a widely criticized deal.
Takeda was advised by Evercore, J.P. Morgan and Nomura, while Shire worked with Citi, Goldman Sachs and Morgan Stanley.
($1 = 0.7366 pounds)
(Editing by Keith Weir)
By Ben Hirschler, Paul Sandle and Sam Nussey