A.J. Burnett is finally a Pirate.

Major League Baseball on Sunday night finalized the trade between the Pirates and New York Yankees, bringing Burnett to Pittsburgh in exchange for two Class A prospects.

The Yankees got reliever Diego Moreno and corner outfielder Exicardo Cayones, neither of whom was prominent in the Pirates' plans. The Pirates also got $20 million to cover part of the $33 million salary Burnett is owed over the next two seasons.

Because the deal involved significant cash, it had to be approved by commissioner Bud Selig.

Burnett passed a physical Sunday afternoon at Pirate City as pitchers and catchers held their first spring training.