Tigers 8, Pirates 4: Victor Martinez went 3-for-4 with three RBIs and Nick Castellanos hit a tiebreaking homer and drove in two runs as host Detroit defeated Pittsburgh to halt a four-game losing streak.Castellanos and Torii Hunter had two hits apiece as the Tigers remained a half-game behind the Kansas City Royals in the American League Central. The Pirates remained 1 1/2 games behind Milwaukee in the National League Central.Blaine Hardy (2-1) pitched two hitless innings of relief for Detroit. Buck Farmer allowed four runs and six hits in five innings in his major-league debut while Pittsburgh's Vance Worley (5-2) gave up five runs (three earned) and nine hits in 5 1/3 innings.Detroit took a 5-4 lead in the sixth when Castellanos deposited a drive over the wall in left-center field off Worley. Martinez smacked a two-run single to right in the seventh and Hunter drove in another with a fielder's choice. The Pirates built a 4-1 lead on Russell Martin's third-inning double and a three-run fourth that featured Jordy Mercer's triple and Travis Snider's two-run homer. Detroit knotted the score with three in the fifth on Alex Avila's homer, Miguel Cabrera's sacrifice fly and Martinez's single to center.GAME NOTEBOOK: Martin's double was the 1,000th hit of his career and extended his hitting streak to 11 games. … Detroit optioned RHP Kevin Whelan to Triple-A Toledo to open a roster spot for Farmer. … Pirates 2B Neil Walker (back) was out of the lineup for the 10th time in 11 games.