the eleventh inning. During the eighth inning in the second game of the ALDS, Rangers outfielder Carlos Gómez hit a 102-mph line drive single that struck Liriano near the back of the head. He was taken to a local hospital for examination, and cleared to return to Toronto with his teammates. On June 25, 2017, Liriano earned the 100th win of his career in an 8–2 victory over the Kansas City Royals. Houston Astros On July 31, 2017, the Blue Jays traded Liriano to the Houston Astros for Nori Aoki and Teoscar Hernández. Liriano was moved from the rotation to the bullpen following his acquisition. He made 20 appearances out of the bullpen and finished with an 0–2 record with a 4.40 ERA. Overall in 2017, Liriano made 38 appearances (18 starts), posting a 6–7 record and a 5.66 ERA. The Astros finished the year with a 101–61 record (first in AL West), and eventually won the 2017 World Series. Detroit Tigers On February 23, 2018, Liriano signed a one-year contract with the Detroit Tigers. He earned a spot in the Tigers starting rotation, and won his Tiger debut in a 6–1 decision over the Kansas City Royals on April 2. Liriano was placed on the 10-day disabled list with a hamstring strain following a May 26 start against the Chicago White Sox. He was recalled on June 23 and made a start against the Cleveland Indians. On August 30, 2018, Liriano gave up Giancarlo Stanton's 300th home run. Liriano made 26 starts for the Tigers, compiling a 5–12 record with a 4.58 ERA and 110 strikeouts in innings. Return to Pittsburgh On February 4, 2019, Liriano agreed to a one-year minor league deal with the Pittsburgh Pirates. On March 23, 2019, the Pirates announced that Liriano had made the opening day roster. He was used exclusively as a relief pitcher during the season, posting a 5–3 record with a 3.47 ERA in 69 relief appearances, and he recorded 63 strikeouts in 70 innings. Later career On January 22, 2020, Liriano signed a minor league deal with the Philadelphia Phillies. He was released on July 18, and on August 2, Liriano opted out of the 2020 season due to the COVID-19 pandemic, although he had "multiple guaranteed offers" on the table. On February 2, 2021, Liriano signed a minor league contract with the Toronto Blue Jays, and was invited to