MANCHESTER – It happened on every hole. While their caddies jumped into golf carts and motored down the fairway after each tee shot, Ryan Gay and Matt Greenleaf walked together, talking about golf, life and everything in between.

“We were talking about chip shots, talking about girls, talking about whatever,” Greenleaf said. “We’re good friends, and we like playing together.”

On the 16th green, Greenleaf had one more thing to say to Gay. Congratulations.

By winning holes 15 and 16, Gay clinched the Maine State Golf Association’s Match Play Invitational at the Augusta Country Club on Wednesday afternoon, with a 3-and-2 victory over Greenleaf.

“I’ve known Matty a long time. We’ve played a lot of golf together,” Gay, who last month won his second consecutive Maine Amateur title, said. “I hit some good shots. Grinded it out, and kept it together.”

A three-time Maine Am champ, Gay beat two-time Maine Am winner Ricky Jones, 4-and-3, in the morning’s semifinal round. Greenleaf led Brian Bilodeau throughout their semifinal match, before Bilodeau took a 1-up lead on the 17th hole. Greenleaf tied the match on 18, then won on the 19th hole for his second consecutive 19 hole victory.

By the time Greenleaf and Gay hit the back nine, Greenleaf was feeling fatigued.

“Running out of gas, no question. It’s a lot of golf in three days,” Greenleaf said. “We really didn’t have much for the fans, both of us. We didn’t play lights out. There weren’t a lot of birdies out there, a lot of pars.”

Greenleaf picked up a par on 14 to cut Gay’s lead to 1-up, but back-to-back pars on 15 and 16 sealed the win for Gay.

“When he got it down to 1-up, I knew if I made par on 15 it would be a good score with the wind blowing,” Gay said, “and I really just wanted to give myself a good birdie look on 16, which I did.”

The turning point of the match was the par-4 12th hole, where Greenleaf was unable to capitalize on Gay’s misfortune. Gay’s first tee shot went out of bounds to the left of the green.

“I clubbed down to a 3-wood, thinking that if I hit it left, it would come up short. It still flew everything, which I couldn’t believe. I didn’t think I could hit that far,” Gay said.

Gay’s second tee shot landed in a spectator’s golf cart. Gay lifted his ball from the cart and was allowed to drop it on the path. Given relief from the cart path by the judge, Gay chipped onto the green and putted for bogey.

Greenleaf, meanwhile, ran into trouble of his own to the right of the green, also had to settle for a bogey, and was unable to cut into Gay’s 2-up lead.

A par putt on the second hole gave Greenleaf a short-lived 1-up lead. Gay tied the match with a par on hole four, then took the lead for good with a birdie on six.