Georgetown’s Jabril Trawickshoots while being defended by Gorgui Dieng of Louisville. The Hoyas snapped the Cardinals’ 20-game home winning streak. (Andy Lyons/GETTY IMAGES)

Georgetown’s freshman class helped the Hoyas endure a sloppy first half Wednesday. Then a more familiar face came through in the second.

Markel Starks scored 16 of his career-high 20 points in the final 20 minutes to complement Otto Porter’s first career double-double, and No. 12 Georgetown escaped with a thrilling 71-68 victory over the fourth-ranked and previously undefeated Louisville Cardinals.

“It was a very good win, against a very good team in a very difficult place to play,” Coach John Thompson III said of his team’s ninth straight triumph. “All that being said, we’re fortunate to get away with the win. They turned up the heat on us.”

They did, indeed.

The Hoyas (11-1, 1-0 Big East) opened a 63-52 edge on a backdoor layup by Starks with 4 minutes 23 seconds remaining. But it almost wasn’t enough.

The Cardinals (12-1, 0-1) used a full-court press to spark an 11-0 run that knotted the score at 63 and ignited a boisterous capacity crowd of 22,517. The surge was capped by a goaltending infraction on Henry Sims with 2:02 left.

That, however, was as close as Kyle Kuric, Peyton Siva and the Cardinals would get to taking a late lead. Kuric finished with a team-best 17 points, while Siva contributed 15 points and six assists as Louisville had its 20-game home winning streak snapped.

Porter scored on a put-back to put Georgetown ahead for good, then the freshman forward made four of his six free throw attempts in the final 40 seconds to clinch the win.

Porter finished with 14 points and 14 rebounds (11 on the defensive glass). Meantime, Starks, a sophomore guard, made three three-pointers in a span of 4:58 in the second half that completely changed the contest’s complexion.

“Our coaches kept telling me these are clutch free throws,” Porter said. “This is what you’ve been practicing. So the crowd never crossed my mind. I just stepped up and took them.”

Starks added: “It’s the Big East. Night in and night out, games are going to be like that. This was a tough Louisville team. We stayed composed, kept it together.”

Louisville Coach Rick Pitino credited Starks and the Hoyas’ freshmen for putting an end to the Cardinals’ best start in 37 years.

“You take away Hollis Thompson,” Pitino said, “and their two freshmen and one sophomore go 14 for 17 from the field.”

Pitino was referring to Starks, Porter and Jabril Trawick, who scored all of his nine points in a turnover-laden first half for the visitors. In all, the Hoyas committed a season-worst 16 turnovers, nine of which came before halftime.

But Trawick and fellow freshmen Porter and Mikael Hopkins made sure all those careless mistakes did not bury them. The trio combined to score 17 points of Georgetown’s 32 points.

“Otto, Jabril and Mikael came in and gave us outstanding minutes,” Thompson III said. “They are freshmen and this is their first Big East experience, but they’ve been doing that since [the trip to China over] the summer. It’s a group that plays hard and competes.”