Democrat Anthony "Buzz" Andrezeski had a hearing Friday afternoon in Philadelphia to defend his candidacy.
He needed 500 valid signatures to stay in the running, however the judge ruled he only had 496.
Andrezeski is running for Pennsylvania's 49th District Senate seat.
He says he will be filing an appeal.
Meanwhile, 4 other democrats are on the ballot for this race: Terry Scutella, Brian Pitzer, Sean Wiley and John Harkins.