The Owls (1-1) had lost 22 consecutive games to BCS opponents since a 15-13 win over Duke on Sept. 8, 2001. Rice had not beaten a Big Ten team since a 40-34 win at Northwestern in 1997.
The Boilermakers got the ball near midfield with 1:52 remaining, and three long runs by Ralph Bolden moved them inside the 20.
Purdue (1-1) was content to let the clock run down so that Wiggs' kick would be the final play. But Allen surged through the middle of the line and blocked it, and the Owls' sideline emptied onto the field in celebration.
Caleb TerBush completed 18 of 33 passes for 183 yards for Purdue, which needed a last-minute touchdown pass from TerBush to Antavian Edison to beat Middle Tennessee in its opener last week.
The Boilermakers fell short this time, failing to cash in on several scoring opportunities in the second half.
Taylor McHargue completed 19 of 29 passes for 230 yards and two touchdowns for Rice. The sophomore went 11 for 18 for 138 yards in the first half, then completed his first four throws of the third quarter, including a 19-yard touchdown to Sam McGuffie to put Rice up 24-17.
The Boilermakers drove into Rice territory twice in the third quarter and came away with nothing.
Owls defensive end Scott Solomon sacked TerBush to push Purdue out of field-goal range on the first series. Purdue then drove to the Rice 2, but Akeem Shavers was stopped at the line on fourth down.
Purdue's defense made a play of its own, tackling Rice running back Charles Ross in the end zone for a safety to make it 24-19.
McHargue converted a third-and-19 with a 35-yard strike to wide receiver Randy Kitchens early in the fourth quarter. Purdue's Robert Maci then sacked McHargue and knocked the ball loose, and Kawann Short recovered with 10:58 left.
TerBush completed three consecutive passes for big gains and Purdue quickly drove to the Rice 13. The Owls' defense stiffened again, and Wiggs' 27-yard field goal cut the deficit to 24-22.
The teams were tied 17-all at the break.
The Owls led 3-0 when Shavers broke a 43-yard run to kick-start Purdue's ensuing series. TerBush threw a 24-yard pass to Edison to the Rice 5, and TerBush dashed into the end zone on third down, his first career touchdown run.
In the second quarter, Purdue cornerback Josh Johnson broke up an Owls' reverse for a 16-yard loss, Rice punted from its own end zone and the Boilermakers started from the Rice 46.
The Boilermakers moved ahead 17-10 after TerBush found tight end Crosby Wright over the middle for a 19-yard touchdown with 5:56 left in the half.
McHargue had Rice on the move in the final minutes of the half, and got lucky when center Eric Ball recovered his fumble at the Purdue 19. Tight end Luke Willson made a diving catch in the end zone on the last play of the first half. After an official review, the catch was confirmed for the tying score.
Purdue outgained Rice 366-352, but converted only 6 of 18 third downs. The Owls also recorded four sacks.