It wasn’t easy for the University of Maine football team. It never is when the Black Bears have to play Albany, a massive thorn in their side in recent seasons.

The Black Bears did prevail on Saturday, like they have all but once this season. By doing so, Maine made school history.

Senior quarterback Marcus Wasilewski passed for 231 yards and three touchdowns as the eighth-ranked Black Bears held off Albany 33-27 before 4,912 fans at Bob Ford Field.

“It was as hard-fought a win as we’ve gotten this year,’’ Maine head coach Jack Cosgrove said.

Maine improved to 9-1 for the first time since starting its football program in 1892, an accomplishment that resonated with Wasilewski and his teammates.

“It’s a huge deal,’’ Wasilewski said. “You go into playing college football, and all you want to do is leave your mark, one way or another, whether it’s individually, mostly as a team, especially. And you just want to say, I did something special when I played the game of college football … You can say we made the history books. We did something no one else can do, but at the same time, we’re looking to next week now, and it’s far from over for us.”

The Black Bears also moved to 6-0 in Colonial Athletic Association play, the first time they’ve won their first six league games since belonging to the Yankee Conference in 1989. Maine clinched at least a share of the CAA title, holding a two-game lead with two games to play.

Cosgrove noted he led Black Bear teams that started 8-1 in 1989 and in 2002, only to lose their 10th game.

“I’m thrilled for the guys,’’ Cosgrove said. “Hundred twenty-one years of Maine football and no team’s been 9-1. It’s a great accomplishment. I was part of the two others in ’89 and ’02. Those were great teams, but this team has a unique toughness. It’s very strong upstairs in the mental game. They really stay focused. They don’t get distracted.”

Wasilewski said Maine was especially determined against an Albany program that had beaten the Bears three of the past four years when the Great Danes were still playing in the Northeast Conference. Albany (1-9, 0-6) joined the CAA this season and gives out 54 scholarships to Maine’s 63.

“You can almost call (Albany) a rival, that’s the way we look at it,’’ Wasilewski said “Like Coach Coz says, they’re similar to us. Hard-nosed and blue-collar, tough kids. So we knew right away it was going to be a street fight going in. It was definitely a motivational tool for us.”

The teams were tied at 14 at halftime and then combined to score touchdowns on five consecutive drives in the second half. Maine went ahead for good with 11:16 remaining in the fourth quarter, when Wasilewski threw a 4-yard touchdown pass to senior John Ebeling for a 33-27 lead. The Black Bears missed the extra point.

Wasilewski moved to his left and considered running before finding Ebeling, who also had a 13-yard touchdown reception in the third quarter.

The Maine defense didn’t allow Albany to cross midfield on its final three drives. Defensive end Trevor Bates preserved the victory when he sacked Albany quarterback Will Fiacchi from behind and forced a fumble that Jonathan Louis recovered at the Albany 12 with 1:43 to play.

“I wasn’t really effective on the pass rush throughout the game,’’ Bates said. “I knew, two-minute drill, that’s a huge opportunity to step up and make a play.”

Maine can clinch the CAA championship with a home win over Rhode Island on Saturday.