Updated at 9:38 p.m.

In a surprise move, Rep. Steve Stockman (R-Tex.) filed papers to challenge Sen. John Cornyn (R-Tex.) at the last minute Monday, giving the second-ranking Senate Republican a potentially tough primary opponent just as he looked poised to avoid one.

Texas Republican Party spokesman Spencer Yeldell told Post Politics that aides to Stockman withdrew his application for reelection to the House and switched to the Senate race shortly before the filing deadline arrived on Monday.