Anibal Sanchez is joining the Nationals on a contract for two years and $19 million with a club option for 2021. (John Bazemore/Associated Press)

The Washington Nationals reached an agreement Thursday with right-handed starting pitcher Anibal Sanchez, pending a physical, a person with knowledge of the situation said. Sanchez’s contract is for two years and $19 million with a club option for 2021, giving Washington another veteran arm in a rotation thinned after Tanner Roark was dealt to the Cincinnati Reds last week.

According to a person familiar with the deal, the Nationals will pay Sanchez $6 million in 2019, $7 million in 2020 and defer $6 million of the contract to 2021. That will give the Nationals increased financial flexibility to make moves for the short term as they look to finish a busy offseason.

Sanchez, 34, was one of the Nationals' initial targets after trading Roark, and conversations with his representatives spilled into this week. He finished 7-6 with a 2.83 ERA with the Atlanta Braves last season. Sanchez, who has split much of his career between the Miami Marlins and Detroit Tigers, had a career-low 2.57 ERA in 2013 and was fourth in American League Cy Young Award voting at the end of that season.

He struggled in the four seasons since before reviving his career with the Braves in 2018.

He was particularly tough on the Nationals this past season, posting a 1.50 ERA in 18 innings. That only continued his career success against Washington and at Nationals Park. In 25 starts against the Nationals, Sanchez owns a 10-1 record with a 2.08 ERA. In 10 starts in what will now be his home stadium, he is 4-1 with 2.11 ERA. He will join Max Scherzer, Stephen Strasburg and Patrick Corbin, signed earlier this offseason, as the set parts of the Nationals' starting staff.

Once Roark was moved, the team needed at least one more proven arm to fill out its rotation. With Roark expected to make around $10 million in his final year of arbitration, the Nationals sought a comparable pitcher who would come at a lower cost. Among the names being discussed were Sanchez, lefty Wade Miley and 33-year-old right-hander Mike Fiers.

That led to Sanchez and a hope that he is the pitcher of last season, not the one who stumbled through the previous three years. The average annual value of his contract is $9.5 million, and the $6 million he’s owed in 2019 makes him around $5 million cheaper than Roark would have been. If he performs like he did with the Braves, he could be more effective than Roark, too. The biggest concern with Sanchez is his durability — he has averaged 23 starts the past five seasons; Roark topped 30 in four of those years.

The final question, as far as the Washington rotation goes, is what the team will do with the fifth spot. The Nationals still have around $18 million to spend before they reach the luxury tax threshold, and a full-time second baseman seems to be the only major item left on their shopping list.

The Sanchez agreement is the eighth significant move of their offseason, as they had already made two moves to improve the bullpen, acquired two proven catchers, signed Corbin, traded Roark to give themselves additional financial flexibility, and brought back first baseman Matt Adams last weekend. Pursuing another starter is certainly not out of the question.

But Washington also has internal options that include Joe Ross, Erick Fedde and Henderson Alvarez, the former all-star signed to a minor-league deal late last month. Ross made three starts at the end of last season after returning from a 14-month recovery from Tommy John surgery, and could have a chance to compete for a rotation spot in spring training. Fedde, 25, the organization’s top pitching prospect at the start of 2018, was slowed by injuries last year and could also get his chance. Alvarez, 28, is in a similar situation of having to prove himself after a handful of injury-shortened seasons.

Read more:

After 14 years, two combat zones and a hat trick, a mission to find a beloved Nats cap

Matt Adams returning fills a very specific need for the Nationals

There’s precedent for Bryce Harper leaving Washington. It happened 84 years ago.

As Nationals mull second base options, there’s ‘mutual interest’ with Josh Harrison

What really happens in Vegas: Things we overheard at baseball’s winter meetings