Oliver Perez has agreed to a deal with the Diamondbacks, sources say.

The deal will be for $4.5 million over two years.

Perez resurrected his career in Seattle as a reliever after a tough time starting with the Mets following a $36 million, three-year deal.

Perez will provide a needed lefty for Arizona's bullpen. Several other teams, mostly in the National League, expressed interest. The Marlins and Braves were believed to be among them.