Right before Kerr Smith was pulled aside and told his “Dawson’s Creek” character Jack McPhee was gay, he thought he was being fired.

“[Series creator Kevin Williamson] said, ‘Kerr, let’s go get some coffee,’ ” Smith, 47, told TooFab. “I went, ‘Oh no, am I fired?’ And he throws this idea, ‘We want to go down a different avenue with Jack.’”

That avenue turned out to be a TV trailblazer in 1998, as Jack’s kiss with another guy was the first of its kind on prime-time television. Now Smith is reflecting on his roots after joining the Season 4 cast of the CW’s pulpy teen drama “Riverdale.”

“We were the first ones to do that. It was a crazy experience back then . . . look at every single show now, it’s pretty amazing,” he said. “There’s always a gay storyline, a lesbian storyline or whatever. I was talking to Casey [Cott, who plays gay student Kevin on ‘Riverdale’] and he’s playing pretty much the same character I played on ‘Dawson’s.’ ”

‘I’m glad we did it, and it was part of history.’

Before filming his pivotal “Dawson’s Creek” scene 21 years ago, Smith thought he should check the cultural temperature among his peers.

“I remember calling everybody I respected and said, ‘Hey should I do this?’ Doing the first male-male kiss, I remember it was intense,” he said. “I’m glad we did it, and it was part of history.”

Back in the spotlight on “Riverdale,” Smith made his entrance Wednesday night as Mr. Honey, a character who is a first for the show: an adult who enforces rules and is actually alarmed by all the murder happening around town.

In one of his first acts as the new principal, Mr. Honey cancels a school dance because people were killed at the last one. Unfortunately, it doesn’t score him any brownie points with dance organizer Cheryl (Madelaine Petsch), though, who takes out her ire by putting a beehive behind his desk.

Thursday’s episode was also the real start to Season 4, as the first episode was a tearjerker honoring the late Luke Perry, who played Archie’s dad, Fred.

“Riverdale” airs Wednesdays at 8 p.m. on the CW.