After months of speculation, weeks of negotiations and one massive collapsed megadeal, the Yankees and Diamondbacks finally agreed to terms Thursday on a trade that will bring Randy Johnson to the Bronx in exchange for Javier Vazquez, prospects and $9 million in cash, multiple sources said.

The official announcement likely won’t come until next week, since commissioner Bud Selig must approve the transaction. After that, the Yanks will have a 72-hour window to work out an extension for the Big Unit, likely to be for two years and $32 million, and have him waive his no-trade clause. The players must also pass physicals.

But for all intents and purposes, the most-anticipated trade of the offseason is complete. The Bombers will send Vazquez, Brad Halsey, Dioner Navarro and the $9 million, which will be paid out in increments over the next couple of years, to the D-Backs in exchange for the five-time Cy Young winner that George Steinbrenner has coveted for years.

The inclusion of Navarro, a 20-year-old catcher, was critical since the D-Backs — who already have a premier catching prospect in Koyie Hill — also are looking to trade for Dodgers slugger Shawn Green. Navarro was a player the Dodgers specifically requested when they got involved in three-way talks with the Yanks and Arizona last week, ultimately backing out at the 11th hour of the blockbuster exchange that included Green, Brad Penny, Vazquez and Johnson.

Most Read Stories

The Diamondbacks, according to sources, are also expected to have an auction for Vazquez, who as a player being traded in the midst of a multi-year contract has the right to demand a trade following the 2005 season. Vazquez has made it known that his preference is to remain on the East Coast and the D-Backs are said to have already made an internal decision to try to oblige him. The Phillies, Orioles, Tigers and White Sox are the leading contenders and the D-Backs will be asking for at least one established starting pitcher in return.

Johnson will become the front man for the Yankees’ overhauled starting rotation, which was the area targeted by Yankee executives after the Bombers’ historic collapse to the Red Sox in the ALCS. Free agents Carl Pavano and Jaret Wright signed with the Yanks earlier this month, but Johnson was the top priority.

Getting the 41-year-old lefty certainly wasn’t easy, though. The D-Backs and Bombers tried to work out a trade as far back as last summer, but couldn’t find common ground before the July 31 trading deadline. Then offseason talks broke down on Dec. 1 after Yankee officials said Arizona’s demands were excessive, including a request that the Yanks include reliever Tom Gordon or trade for one of 10 listed starters on other teams and then include him in the deal.

Negotiations restarted after the winter meetings, however, and the sides finally were making progress on a deal before the holidays when the Dodgers injected themselves into three-way talks, only to bail out — after assuring the other two teams that they wouldn’t do so — leaving the Yanks and D-Backs frustrated.

But, after taking some time off over Christmas, incoming Diamondbacks CEO Jeff Moorad called Yankees president Randy Levine on Monday to renew discussions and a deal came together after numerous conversations over the past four days.

The Bombers had initially avoided including Navarro and their other top prospect, Eric Duncan, in negotiations, but were more willing to trade Navarro after his stock within the organization fell last season, sources said. Although the Dodgers are high on him, the Yanks had questions about his work ethic, one source said, in addition to concerns about his mental approach to the game.

Navarro hit .271 with three homers and 29 RBI in 70 games with Double-A Trenton, .254 with one homer and 15 RBI in 39 games for Triple-A Columbus and 3-for-7 as a September callup with the Yanks.

How much cash the Yankees agreed to send Arizona was the final sticking point in talks, as Arizona wanted the Yankees’ help in paying the difference between the $16 million owed to Johnson next season and the $35.5 million Vazquez will earn over the next three years.

The Yankees obviously don’t have similar financial concerns; the Bombers’ payroll almost certainly will top $200 million next year and nearly $100 million of it will be allocated to the pitching staff. The Yanks surely were the only team willing to make such a huge financial commitment to Johnson, who has a balky back and a gimpy right knee to go along with his legendary left arm.

Then again, Steinbrenner is focused on the short-term, clearly determined to exact revenge for the Yanks’ loss to Boston in October. After a winter of calculated movement from both teams, the tension has been ratcheted up even more with former Yankee David Wells signing with Boston and Johnson set to oppose his former teammate — and co-MVP of the 2001 World Series — Curt Schilling.