Villanova took over at the Temple 46 and drove to the 15 with 3 seconds remaining to set up the winning kick.
Philadelphia Mayor Michael Nutter and Cosby were among those at the game, dubbed the inaugural Mayors Cup between the two area schools.
Chris Whitney completed 24 of 35 passes for 278 yards and threw two touchdown passes for the Wildcats. Villanova had dropped five straight against Division I teams and its last victory over a Division I team was in 2003, a 23-20 win over Temple in double overtime.
Get Action News on your website