DENVER — Peyton Manning’s receivers played keep-away with his milestone memento, and the NFL’s new leader in career touchdown passes toyed with the San Francisco 49ers in the Denver Broncos’ 42-17 victory Sunday night.

Manning went into the showdown two TDs shy of Brett Favre’s record of 508 and threw four touchdown passes, giving him 510.

“It is quite an honor,” Manning said. “I do have great appreciation for quarterbacks who played this game throughout the years. It’s very humbling, has taken a lot of hard work, a lot of people helped me get to this point.”

Manning surpassed Favre’s mark with an 8-yard strike to Demaryius Thomas late in the second quarter. As he went to retrieve the ball, his teammates decided to have some fun.

Thomas tossed the historic ball over Manning and to Emmanuel Sanders, who then lobbed it to Wes Welker.

From there, Welker dished it back to Sanders, who then flipped it to Julius Thomas — all of Manning’s favorite targets getting into the act.

“I heard whispers about something,” Manning said. “Those guys are all great athletes, and my vertical leap isn’t what it used to be. I haven’t played keep-away since I was 8 years old. That is something I will always remember.”

Finally, Manning got the ball along with congratulations from his teammates and coaches. The souvenir won’t end up on Manning’s mantle, however — the Pro Football Hall of Fame has a nice spot ready for it.

During the celebration on the sideline, Manning watched the giant scoreboard high above him in the south end zone as his boss, General Manager John Elway, and then Favre offered their kudos.

“I want to say congratulations for breaking the touchdown record,” Favre said. “I’m not surprised. You’ve been a wonderful player, and I’ve enjoyed watching you play. I’ve enjoyed competing against you. I wish you great success for the rest of the season and the rest of your career.”

Manning added a 40-yard TD throw to Thomas after Aqib Talib’s interception in the third quarter that made it 28-10, and then Thomas set up another score with a 49-yard catch.

This time, running back Ronnie Hillman darted through the line for a career-long 37-yard run that made it 35-10. He added a 1-yarder as the Broncos (5-1) finally found a ground game to go with Manning’s passing prowess.

Manning completed 22 of 26 passes for 318 yards with no interceptions to go with his four TD throws.

Demaryius Thomas caught eight of those throws for 171 yards, giving him an eye-popping 521 receiving yards and five TDs in the past three games.

But this night belonged the Manning from start to finish.

He threw a 3-yard TD pass to Sanders on Denver’s first drive and tied the record when Welker took a pass over the middle for 39 yards. Sanders’ score was his first in Denver, and he became the 47th player to catch a TD pass from Manning.

Manning reached the milestone in his 246th regular-season game. Favre needed 302.

“I think Brett has always known he is one of my favorite players. He played the position with so much passion, so much toughness and great production as a quarterback,” Manning said. “I am honored to join this club with him.”