LOUISVILLE, Ky. — Defender Carrie Hanks rested her face on the top of her stick and glared at the turf as the final seconds ran off the clock in Maryland field hockey’s 2-1 loss to No. 1 Connecticut in Sunday’s national championship. Midfielder Brooke DeBerdine shook her head as she approached Maryland’s postgame huddle.

Maryland’s season was over after winning 10 of its previous 11 games. The Terps overcame a 6-5 start to reach the NCAA tournament. They upset No. 2 Duke and No. 3 Michigan to reach the title game. But the Terps (16-7) fell just short of upsetting the best team in the country. Connecticut (23-0) was the first team to finish undefeated since North Carolina went 24-0 in 2007. The Huskies have won three titles in the last five seasons.

Still, freshman midfielder Kyler Greenwalt couldn’t refrain from smiling during her postgame interview. She figured the Terps would earn an NCAA tournament bid despite a 6-5 start. Now, she’s confident Maryland is positioned for future deep postseason runs with five starting freshmen contributing this season.

“We had an incredible run,” said coach Missy Meharg, who guided the Terps to their 23rd straight tournament, “probably a run we all agreed we are surprised to be in this position.”

Meharg said after her team’s win against No. 3 Michigan on Friday the Terps needed to contain Huskies forward Charlotte Veitner to secure the program’s ninth title. But Veitner, who is part of a senior class that ended its career 87-5, was the difference. She scored twice, including the game-winning goal in the 62nd minute.

The Huskies’ leading goal scorer capitalized on a one-on-one opportunity in the 15th minute, finding the net to give Connecticut a one-goal advantage. The Terps attempted three shots in the first half but couldn’t capitalize.

But about seven minutes into the second half, Maryland’s aggressive press helped it maintain possession. Greenwalt scored off an unsuccessful corner opportunity, tying the game at one. The Maryland fans at Trager Stadium waved towels and a Maryland state flag.

“Our energy immediately changed,” Greenwalt said. “We were going after every single ball. We were constantly moving. We had our waves.”

Veitner, however, stole the ball and scored a second time, just when it appeared Maryland was prepared to breakaway.

The Terps then missed a pair of penalty corner attempts, but Maryland remained aggressive, pulling goalkeeper Sarah Holliday with about five minutes remaining to use an extra attacker.

Maryland’s aggressive defensive pressure-style, which Connecticut coach Nancy Stevens said the team expected, was unable to contain the best player in the country.

“They have many skilled forwards,” Hanks said. “They’re a fundamentally disciplined team.”

Meharg used her team’s youth to her advantage all season. Before Sunday, they didn’t know the feeling of losing in a one-goal, tightly contested championship game. Now the Terps do, after securing a spot in the title game despite early season doubts.

Greenwalt has a feeling the Terps will be back.

“[Meharg] might have done one of her best coaching jobs ever,” Stevens said. “For her to get her team to believe that they could get here, she did a remarkable job.”