LANCASTER, Pa. — As Gov. Mike Pence of Indiana was extolling Donald J. Trump to a crowd here on Tuesday as a “good man” who “speaks from his heart,” Mr. Trump was holding a rally just a few states south, with a decidedly different message — suggesting that gun owners could take action against Hillary Clinton.

Moments later, stepping down from the stage, Mr. Pence found himself in a familiar position, trying to explain away Mr. Trump’s comments.

“Of course not, no,” Mr. Pence said, when asked by a local news affiliate if his running mate was calling for his supporters to take up arms against the Democratic nominee.

Less than a month after becoming the Republican nominee for vice president, Mike Pence — Midwestern calm and folksy to Mr. Trump’s controversial and brash — has emerged as the Republican ticket’s cleaner-up in chief, a role that has thrust him deftly, if at times uncomfortably, into the spotlight in his quest to help elect Mr. Trump president.