Willians Astudillo and Tzu-Wei Lin homered Monday as the Twins won their penultimate spring training game, beating the Pittsburgh Pirates 5-3 in Bradenton, Fla.

Spring training ends with an 11 a.m. game against the Pirates in Fort Myers on Tuesday.

Miguel Sano doubled before Astudillo homered in the second inning, but Pittsburgh answered in the third inning when Erik Gonzalez hit a two-run home run off Twins starter Josh Winder.

The Twins took the lead for good at 4-2 when Jake Cave tripled home a run in the fourth, then scored on an error.

Brandon Waddell gave up a ground ball single to Pittsburgh's Bryan Reynolds and walked Gregory Polanco before throwing a wild pitch in the sixth. Kevin Newman's groundout was enough to score Reynolds and cut the lead to 4-3.

BOXSCORE: Twins 5, Pittsburgh 3

Caleb Thielbar and Derek Law pitched an inning each for the Twins. Thielbar conceded one hit and struck out one, while Law walked one and struck out three.

Lin took advantage of a fastball and homered to right field in the ninth off Chasen Shreve.