Along with outfielder Carlos Gómez and pitchers Philip Humber and Kevin Mulvey, Guerra was traded to the Minnesota Twins for Johan Santana on January 29, 2008. With the Fort Myers Miracle, he compiled a 7–2 record with a 4.83 earned run average in the first half of the 2008 season—helping his team capture the Florida State League first-half West Division title. Guerra's first start in the second half of the 2008 season was a 4–0 complete game shutout of the Tampa Yankees. He allowed only three hits, and retired 19 in a row between a first inningsingle by James Cooper and a one-out single by Andres Perez in the seventh. It marked the first shutout of Guerra’ professional career. For the second half, he went 4–7 with a 6.08 ERA in 13 starts. The Miracle again captured the first half division title in 2009, this time in the FSL's newly realigned Southern Division, and Guerra brought a no hitter into the eighth inning of a July 3 game against the Charlotte Stone Crabs. With one out, Christian López broke it up with a double down the left field line. Guerra was promoted to the New Britain Rock Cats immediately after this game. He was named FSL pitcher of the week for the week of June 29 through July 5. His combined record for Fort Myers and New Britain was 12–11 with a 4.89 ERA and 106 strikeouts. On November 20, 2009, he was added to the Twins' 40-man roster. He began the 2010 season with New Britain, going 1–1 with a 3.07 ERA in five starts prior to being promoted to triple-A. During the 2012 season, the Twins converted Guerra into a relief pitcher. The Twins removed Guerra from their 40-man roster after the 2012 season. Guerra competed for the Venezuelan national baseball team in the 2013 World Baseball Classic. He was hospitalized with a blood clot in his right shoulder in March 2013.
Pittsburgh Pirates
Guerra signed a minor league deal with the Pittsburgh Pirates in November 2014. The Pirates promoted him to the major leagues on June 27, 2015. He was designated for assignment on July 31. The Cleveland Indians claimed Guerra off of waivers, but the claim was rescinded due to Guerra experiencing knee inflammation, and was placed on the Pirates' disabled list. The Pirates designated Guerra for assignment after the 2015 season, but signed him to a minor league contract with an invitation to 2016 spring training.
Los Angeles Angels
On December 10, 2015, Guerra was claimed in the Rule 5 draft by the Los Angeles Angels. He was designated for assignment on May 30, 2016, and outrighted to Triple-A on June 3. The next day, the Angels re-selected Guerra's contract, adding him to the 25-man roster. On February 10, 2017, Guerra was designated for assignment.
On January 16, 2018, Guerra signed a minor league deal with the Texas Rangers. He elected free agency on November 2, 2018.
Milwaukee Brewers
On December 8, 2018, Guerra signed a minor league deal with the Milwaukee Brewers that included an invitation to spring training. He opened the 2019 season with the San Antonio Missions. On July 4, the Brewers selected his contract. On July 6, Guerra was designated for assignment. He elected free agency on October 1. On October 18, 2019, the Brewers signed Guerra to a one-year Major League contract. On January 30, 2020, Guerra was designated for assignment following the Brewers' signing of David Phelps.
Philadelphia Phillies
On February 5, 2020, Guerra was claimed off outright waivers by the Philadelphia Phillies.