OAKLAND — Jack Wyman won the Maine Amateur this summer. He also won the Portland County Club championship. And he’s still in the running for the title at the Maine Match Play Invitational.

He needed all that experience Tuesday to avoid elimination.

The top-seeded Wyman faced a two-hole deficit with five remaining before coming back, then winning on the 18th for a 1-up victory against Mike O’Brien, putting him into the quarterfinals at the Waterville Country Club.

Wyman, 26, who began the two-round day with a 5-and-3 victory over Brian Angis, will face eighth-seeded Lance Bernier, who beat Jeff Cole 7 and 6, then Peter Wright in 22 holes.

Second-seeded Sam Grindle also moved on, as did No. 3 Joe Baker, No. 5 Craig Chapman, No. 11 Will Kannegieser, No. 10 Andrew Slattery and No. 20 Tim Desmarais.

“It’s definitely been a breakthrough year for me,” said Wyman, who also was the low amateur at the Maine Open.

“I’ve worked really hard at it so it’s not a surprise for me. But yeah, it’s been a breakthrough. Once you get a win like that at the Amateur, you get some confidence.”

Wyman opened with the victory over Angis, who beat him in the match play championship two years ago.

“He kicked my butt so it was good to get some revenge,” Wyman said.

But against O’Brien, Wyman bogeyed twice on the front nine to fall behind. It was a rare spot but Wyman said he went in expecting the challenge.

“Everyone here is good. Even being the No. 1 seed, you know you’re going to play good players every time,” Wyman said. “You kind of have to get into the mindset that anyone can beat you. You’re not better than anyone else; you’re as good as the next person.”

Wyman got a shot back when O’Brien bogeyed No. 14, then evened the match with a birdie on the 15th.

The victory came on the 18th when Wyman stuck his approach close, then rolled in a birdie putt.

“I kind of knew if I just played my game and stayed the course, I’d be OK,” Wyman said. “Mike put up a great fight. We had a great match.”

Wyman will next face Bernier, who had to grind to advance after a stress-free start to the day. Bernier rolled to the day’s most one-sided victory by beating Cole, the 2014 and ’15 runner-up, before going back and forth with Wright, with fatigue settling in down the stretch.

“I’m lucky to get away with a win in that one. Neither one of us really played well in the end,” Bernier said. “It was dumb mistakes. Mine was choosing bad clubs off the tee and he was struggling with his putter. Pars were winning a lot of holes. When it’s like that, you know it’s ugly.”

Bernier made his last shot count, sticking his approach on the green while Wright found greenside rough. When Wright couldn’t make up-and-down, Bernier had a two-putt for the par and the win.

“It’s definitely a grind. Luckily I was fortunate to just go 12 holes this morning. I saved some energy but I definitely got tired at the end,” said Bernier, who trailed by two shots during the round but never had a multiple-shot lead. “It was a battle the whole way. An ugly battle, but it was a battle.”

Desmarais and Slattery had arduous trips to the quarterfinals.

Desmarais nabbed two upsets and worked for them, brushing off Dustin Freeman in 19 holes before toppling fourth-seeded Ryan Wingard in 20.

“I’m getting my money’s worth, right?” said Desmarais, who won his second match by putting his approach on the 20th-hole green; Wingard hit through the green.

“I need a nap, some food, a shower, a shave. That was a lot of golf,” said Desmarais. “The second match, the 20th hole, I was gassed. And you could see it in the swing. I’m just like ‘get it on the surface, get it on the surface.’ I don’t have to use energy to putt.”

Slattery’s path was even tougher. He finished off a 23-hole win over Gavin Dugas after beating Keith Patterson in 24.

“I’m exhausted. Absolutely beat,” said Slattery, who said he had never played 47 holes in competition before. “You’ve just got to get over it. You’re tired, you want out, but you’ve just got to realize you’ve got to hit one more good shot, and you’ve got to keep telling yourself that, every single time. ‘I’ve got to hit one more good shot.’ ”

Baker advanced by default before beating Ashley Fifield in 20 holes, Grindle topped Jace Pearson 3 and 2, before beating Joe Walp in 19 holes, bouncing back after losing a two-hole lead with four to play.

“It’s tough but when you’re playing good players, you expect them to make good shots,” said Grindle, who plays for Rollins College.

“That’s one of the keys in match play. You just expect your opponent to make a good shot. You just focus on your shot and hitting the best shot you can hit.”

Chapman reached the quarterfinals by beating Curtis Jordan 2 and 1, then Mark Plummer 3 and 1 in the afternoon, withstanding a late charge by the Augusta Country Club icon.

“I’m technically probably the underdog in that (match), even though I’m the fifth seed,” Chapman said. “He did (make a run), being Mark Plummer. I was 5 up with six to play, and it went all the way down to the 17th hole.”

Kannegieser advanced with a 6-and-5 victory over Len Cole and a 2-up win over Eric Dugas, who, with his brother and Husson University teammate Gavin, authored the day’s two biggest seedings upsets. Eric, the 27th seed, beat No. 6 Brian Bilodeau 2 up, in the first round, and Gavin, the 26th seed, beat No. 7 Drew Powell 3 and 2 before falling to Slattery.