The offer for the company and its Canadian Malartic mine in Quebec tops a rival hostile bid by Goldcorp (TSX:G) that was valued at $3.6 billion or $7.65 per share.
The deal will also see Osisko shareholders receive shares in a new company that will receive a royalty on the production from Canadian Malartic and the company's existing exploration properties as well as hold $155 million cash and the company's Guerrero exploration project in Mexico.
Osisko president and chief executive Sean Roosen noted the first hostile offer by Goldcorp valued his company at about $2.6 billion in January.
"I think that we've delivered a significant amount of value to shareholders," he told a conference call with investors.
"I feel this is the best outcome that we could possibly come to and we've set the stage for two excellent companies to share in the potency of the Canadian Malartic asset and for us to continue on to build value for shareholders."
Under the stock-and-cash offer valued at $8.15 per share, Osisko shareholders will receive $2.09 in cash, 0.26471 of a Yamana share (TSX:YRI), 0.07264 of an Agnico Eagle share (TSX:AEM) and one new share in the new Osisko with a value of $1.20 per share.
The deal, which will require a two-thirds majority vote by shareholders, also gives Yamana and Agnico Eagle five business days to match any superior offer and includes a $195-million break fee, payable under certain circumstances to the buyers if the deal is called off.
Yamana chairman and chief executive Peter Marrone said his company and Agnico Eagle will become equal partners in managing Canadian Malartic and the other assets it is acquiring.
"The acquisition structure minimizes the level of risk generally associated with acquisitions and entering into a new jurisdiction," Marrone said.
"Agnico Eagle is established, it has a presence in the region and it complements the partnership's collective expertise with large conventional open-pit operations."
Agnico Eagle chief executive Sean Boyd called the deal a "unique" opportunity in what he called company's "backyard."
"These assets do not come along that often," he said of the operations that will make the company the largest gold producer in Quebec.
"Quebec's been the foundation for our company and with this transaction will clearly be an important part of the company as it grows," he said.
Osisko shares closed up 51 cents at $7.94 on the Toronto Stock Exchange on Wednesday, while Agnico Eagle fell $2.74 at $30.71. Yamana shares closed down 35 cents at $8.83 and Goldcorp shares gained 22 cents to finish at $26.22.
The improved offer follows a decision last week by Goldcorp to raise its bid for the company. Under that proposal, which requires at least 50.1 per cent of Osisko shares be tendered, shareholders would receive $2.92 cash and 0.17 of a Goldcorp common share.
The new agreement also tops a rather complex deal Osisko had signed with Yamana and two of Canada's largest pension funds that valued Osisko at about $3.4 billion. Under the deal announced Wednesday, the CPP Investment Board and the Caisse de depot et placement du Quebec will no longer participate.
Desjardins analyst Michael Parkin noted the deal was far less complicated that Osisko's earlier agreement with Yamana and the pension funds and suggested it "will be well regarded by shareholders."
"We think that this bid would offer Osisko shareholders sufficient enticement to tender their shares as they would receive a significant premium to the previous market price of Osisko shares while retaining an interest in the long-life and significant free cash-flowing asset in the Canadian Malartic," Parkin wrote in a note to clients.
"They would also retain some upside potential in the 'New Osisko' shares, which are well funded with $155 million, a large camp to explore in Mexico and a royalty stream on its exploration asset portfolio."
The announcement came as Goldcorp said it would seek to replace the board of directors at Osisko with its own slate of nominees.
Goldcorp said Wednesday it would nominate 11 people including its own chief executive Chuck Jeannes to the Osisko board for election at the company's annual meeting next month.
All the proposed Goldcorp nominees, except for one who is nominated as a director of Goldcorp at its upcoming annual meeting, are currently directors or executives at Goldcorp.
Canadian Malartic began commercial production in May 2011 and has been ramping up its numbers in recent months.
Osisko said earlier this month that the mine produced 140,029 ounces gold in the first quarter, a record for the mine. Gold production is expected to be between 525,000 to 575,000 ounces for the full year.
Canadian Malartic produced 475,277 ounces of gold in 2013.