Greene replaced Liriano for the ninth, got one out, then allowed Segura's infield single. Greene then threw two quick strikes to Haniger. But with catcher James McCann set up outside, Greene hung an 81-mph slider over the plate. Haniger put that mistake over the left-field wall for his 11th home run of the season, tying the game at 2.
"I couldn't have made a worse pitch at a worse time. And I paid for it," Greene said.
Greene entered Sunday third in the American League with 10 saves. He ended it with his third blown save this season.
Two innings later, Detroit lost for the fourth time in seven games against the Mariners over the last two weekends. At least the Tigers play at Minnesota and not Seattle on Monday.
"Hopefully, the sun comes up tomorrow," Greene said. "And I'll be ready to go."
Farmer has a 10.12 ERA in his last six outings. But he was the victim of bad luck Sunday. Two ground-ball singles beat him.
Gordon hit the first pitch from Farmer (0-3) in the bottom of the 11th through the right side for a single. The Mariners' zooming leadoff hitter got to second by stealing his American League-leading 16th base. Segura then slapped Farmer's two-strike fastball past first baseman John Hicks to win it.
Mariners reliever Nick Vincent (2-1) got the win by allowing a single to Hicks in the top of the 11th then striking out Niko Goodrum looking and McCann swinging.
The recently ineffective Liriano was almost incredible Sunday. Leading 2-0 after Hicks' home run in the first, Liriano allowed only a line-drive single to Haniger with one out in the seventh. It was the 76th of his season-high 102 pitches.
The fifth pitcher born in the Dominican Republic to throw a no-hitter, back in 2011 when he pitched for the Twins, quickly retired Ryon Healy and Kyle Seager following Haniger's hit.
"He did what he had to do," Gardenhire said.
Liriano had slogged through two previous starts, allowing eight total earned runs while lasting just 4 1/3 innings against Cleveland and four innings at Texas. But Sunday, he shined. He walked three, struck out five and continually pitched ahead in counts. He used his slider up and down the strike zone to take advantage of eager Mariners.
"I was trying to get ahead in the count," Liriano said. "They were swinging early in the count, too."
Hicks' fifth home run of the season was his third in two weeks since Cabrera went on the disabled list.
MOMENTS THAT MATTERED Liriano walked Gordon Beckham one out into the bottom of the eighth. As Mariners pinch-hitter Mike Zunino was announced, Gardenhire walked to the mound. With his entire infield around him there, Liriano, then at 89 pitches, extended his left hand with the ball to give it to his manager, so Gardenhire could bring in reliever Joe Jimenez.
Gardenhire refused the offer. Instead, he patted the veteran left-hander on the chest.
"Yeah, I thought he was going to take me out," Liriano said. "But he asked me how I felt. I told him I felt good.
"He said, 'Just go get the next guy out.'"
Liriano responded by striking out Zunino looking at a high slider, and Andrew Romine on an 87 mph slider in the dirt. Detroit stayed ahead 2-0.
"We've got a history together," Gardenhire, the Twins manager from 2002-14, said of Liriano's time as a starter for him in Minnesota (2005-12). "He knows that normally when I come out I'm going to get the ball. ... Boz [pitching coach Chris Bosio] was saying he was done. I just thought he had a one-hitter going, and I thought he had enough to get that part of the order out.
"I trusted him. ... He knows me. He knows I have trust in him in those situations."
SOUND SMART Liriano has allowed three runs or fewer in eight of his nine starts this season. He retired 16 in a row from a walk to Haniger in the first to that lone hit by Haniger in the seventh.
Liriano came within five outs of becoming the first pitcher born in the Dominican Republic to throw more than one no-hitter in his career. He, Juan Marichal (1963), Ramon Martinez (1995), Jose Jimenez (1999) and Ubaldo Jimenez (2010) are the only Dominican natives to throw a no-hitter.
Justin Verlander remains the last Tigers pitcher to throw one, May 7, 2011, at Toronto.
UP NEXT The Tigers head to Minnesota for a three-game series against the Twins, starting Monday at 8:10 p.m. ET. It will be the first time in Gardenhire's career the former Twins manager has managed games against Minnesota in Minneapolis. Blaine Hardy (0-0, 3.38 ERA) makes his second spot start for injured Jordan Zimmermann. He faces Twins right-hander Jose Berrios (4-4, 4.05).
Gregg Bell is a contributor to MLB.com based in Seattle.