Free-agent right-hander Yovani Gallardo and the Orioles have reached agreement on a three-year, $35 million contract, according to ESPN and media reports. 

Sources told ESPN that there's a fourth-year option for $13 million as part of the deal.