WASHINGTON -- Free agent pitcher Yusmeiro Petit has agreed to a contract with the Washington Nationals, pending a physical exam.

Nationals general manager Mike Rizzo said Saturday the team has a deal in place with Petit, a right-hander who was not tendered a 2016 contract offer by the San Francisco Giants by the deadline earlier this month.

The 31-year-old Petit went 1-1 with a 3.67 ERA in 42 appearances last season, all but one as a reliever.

More from FoxSports

Since making his major-league debut in 2006, he is 20-27 with a 4.59 ERA in 161 games (57 as a starter).

Rizzo called Petit ''a good swing guy'' who has ''pitched leverage innings in the playoffs'' and ''really gives the manager a lot of freedom and diversity,'' as someone who can start or throw multiple innings as a reliever.