Virginia trailed for most of the game, against a team that owned the Cavaliers recently, but they fought their way into the NCAA men’s lacrosse championship game on Saturday.

Ian Laviano’s shot on an assist from Matt Moore with 3 minutes and 9 seconds left in the second overtime gave Virginia a 13-12 victory over Duke in the first NCAA Division I semifinal at Lincoln Financial Field.

Virginia (16-3) will face Yale in the championship game at the Linc at 1 p.m., Monday. Yale beat Penn State, 21-17, in the second semifinal.

The Cavaliers, who trailed by as many as four goals in the third quarter and three in the fourth quarter, will be seeking their sixth national championship, the most recent coming in 2011. They have outscored opponents, 17-9, in the fourth quarter and overtime of this year’s tournament.

Moore, a sophomore from Garnet Valley who had two goals and two assists, ran behind the net and found an open Laviano in front, The sophomore scored his fourth goal of the game and 50th of the year, and the Virginia sideline erupted.

“That is something me and Matt have connected on before,” Laviano said about the game-winner. “Incredible look by Matt, and I had the easiest part, putting it in the back of the net.”

Virginia is 5-0 in overtime games this year. The Cavs snapped an 11-game losing streak against their Atlantic Coast Conference rival Duke. That included a 12-7 regular-season loss to the Blue Devils (13-5).

“They had our number since we all have been here,” said Virginia junior midfielder Dox Aitken, a product of the Haverford School. “We knew that was a monkey on our back for a while, but this week we tried to separate the history from this game, because this is the biggest stage we have been on, and we were really just focused on ourselves.”

Virginia drew to within 11-10 when Aitken scored his second goal in a 46-second span, with 7 minutes, 55 seconds left in the fourth quarter. It was the third goal of the game and 42nd of the season for Aitken, who is a finalist for the Tewaaraton Award, which honors the top male college lacrosse player.

Duke’s Kevin Quigley answered as the shot clock was expiring on a shot from 8-yards out with 1:56 left in the fourth quarter.

Virginia then made it 12-11 on a goal by Michael Kraus off an assist from Mikey Herring with 45.9 seconds left.

After the Cavs earned possession on a faceoff violation, Laviano tied the score with 14.4 seconds remaining on an assist from Moore.

Kraus, who had a goal and four assists, almost scored the game-winner in regulation, but he shot wide with eight seconds left.

He also shot wide from close range with seconds left in the first overtime.

Virginia goalkeeper Alex Rode matched his season high with 19 saves, including a few in overtime.

Duke coach John Danowski was offering no excuses for the loss.

“We weren’t good enough to win today," he said. “It was really that simple.”