AVENTURA, Fla. — With the Chiefs trailing by four with about 20 seconds left in the first half of the AFC Championship Game, quarterback Patrick Mahomes dropped back to pass, stepped up in the pocket and ran to his left.

He tiptoed up the sideline and cut inside at the 5, where Titans cornerback Tramaine Brock repeatedly ripped at the ball. Mahomes almost fumbled but instead stumbled into the end zone for a 27-yard touchdown run.

As a reward for the most important run of Mahomes’ career, quarterbacks coach Mike Kafka made him do ball-security drills.

‘‘I’m like: ‘Man, I gotta stop running or something. Every time I do that, you have me doing another different drill,’ ’’ Mahomes said Tuesday. ‘‘That mindset of trying to be great and not being satisfied with where you are has really helped me out a lot.’’

Mahomes is used to Kafka holding him to such standards.

‘‘He expects me to be great every single day,’’ said Mahomes, whose Chiefs will face the 49ers in the Super Bowl on Sunday. ‘‘He goes out there and doesn’t let me be satisfied with . . . having success. He wants to make sure I’m better every single time I’m out there.’’

There are hazards with that, Mahomes admitted.

‘‘He tries to make me watch Northwestern film,’’ Mahomes said with a smile. ‘‘I try not to watch too much of it.’’

The man behind the NFL’s most important player is a former Wildcats quarterback. And a St. Rita High School alum.

‘‘Pat’s the one out there with the football,’’ Kafka, 32, said. ‘‘Pat’s the one putting in the work, in-season and the offseason. I’m trying to facilitate and put him in the right direction. He’s the one putting in the time and watching film and studying and prepping. He’s taken great steps. From the day he got here to now, it’s night and day.’’

Kafka’s reputation has grown alongside Mahomes’.

‘‘I aspire to be an offensive coordinator,’’ he said. ‘‘I aspire to be a head coach one day. Those are great things. All those things will happen, will take care of themselves. . . .

‘‘This is a great experience. Can’t beat it. You’re in the Super Bowl. This is what you dream about as a kid, dream about as a coach.’’

Kafka started four games as a freshman at Northwestern but didn’t become the regular starter until 2009. He led the Big Ten in passing yards and completion percentage as a senior and in his final game — the 2010 Outback Bowl — set a school record by throwing for 532 yards.

The Eagles drafted Kafka in the fourth round four months later. Their coach was his current boss, Chiefs coach Andy Reid. Kafka played in four games for the Eagles in 2011 and spent parts of six seasons bouncing around the league.

Reid pulled Kafka into the NFL coaching ranks in 2017. After he served as a graduate assistant with the Wildcats, Kafka became the Chiefs’ offensive quality-control coach under, among others, then-offensive coordinator Matt Nagy.

‘‘Both of them are awesome in their different ways,’’ Mahomes said of Kafka, who was promoted to quarterbacks coach in 2018, and Nagy, now the Bears’ coach. ‘‘Nagy was amazing with me and my transition into the NFL — being able to relate to me, being able to go out there and let me play fast and be who I am.

‘‘And Kafka coming in and that work ethic and the way he’s able to push me every single day. Both of them are amazing coaches. I’m glad I got that QB room when I first got here.’’

Kafka runs that room.

‘‘Mike’s done a nice job,’’ Reid said. ‘‘Patrick’s been fortunate to be in a good room with good veteran players. And then the opportunity to have Mike in there, who played in the offense and the system . . . he’s been great.’’