COLLEGE PARK, Md. -- Dan Metzger's goal in the waning moments of regulation was the difference as Maryland defeated Brown 2-1 in the second round of the NCAA tournament on Sunday at Ludwig Field.

Bobby Belair scored early for Brown (13-3-3), before goals by Patrick Mullins and Metzger lifted Maryland (18-1-2) to the third round for a nation-best 11th season. They will face Coastal Carolina.

Brown capitalized on its control of possession early in the first half when Belair turned in a corner kick for the game's opening goal. He scored on a Dylan Remick cross for his fourth goal of the season.

Maryland asserted itself late in the half with a series of scoring opportunities. Defender Jordan Cyrus sent a shot from the 18-yard box that was blocked by a Bears defender.

Mullins tied the game before halftime when he received the ball at midfield, dribbled forward and sent a shot from 30 yards that beat Brown keeper Sam Kernan-Schloss.

Mullins' goal was his team-leading 14th of the season and gave the Terrapins momentum going into the second half.

Mullins almost put the Terrapins in front with 34 minutes remaining, but his header was saved by Kernan-Schloss.

Maryland took the lead in the final moments when Metzger deflected a Helge Leikvang cross into the back right corner of the net with 57 seconds remaining. It was his third goal and Leikvang's second assist on the season.

"I'm proud of our team," head coach Sasho Cirovski said. "We didn't play our best soccer, but we showed our championship fiber and found a way to win. To score a goal in the last couple minutes of each half shows a team that's mentally tough.

"Brown is an outstanding team. I expected they were going to give us a great challenge, and they did."

Maryland returns to the field on Nov. 25 to take on Coastal Carolina in the third round.