Former State Sen T. Milton Street Sr. will remain on Philadelphia's May 19 Democratic primary ballot for mayor after a judge ruled Wednesday against a challenger who claimed Street lives in New Jersey.

Common Pleas Judge Chris Wogan ruled that the challenge filed by lawyer Kevin Greenberg was flawed because it was based on a 78-year-old law that was not relevant.

Greenberg's challenge centered on a 1937 revision of the state Election Code, which essentially says a candidate lives where his spouse and family live.

Street testified Friday that his common-law wife lives in a home she owns in Moorestown, Burlington County, but that he lives in a rented rowhouse in North Philadelphia.

Representing himself in court, he argued that the New Jersey residence is irrelevant because that state stopped recognizing common-law marriages in 1939 and Pennsylvania did likewise 2005.

Regarding the law, Wogan agreed with Street.

Greenberg said he anticipates filing an appeal to the state Commonwealth Court. He has 10 days in which to do so.

Street said he looked forward to returning to the campaign trail. "There was never any doubt in my mind that I would survive the challenge," he said after the ruling.

Wogan had ruled Friday against Greenberg on the separate question of Street's party registration. Street filed nominating petitions March 10 to run as a Democrat but had been registered as an independent since March 2012.

Street argued that he had mailed in a form to return to the Democratic Party in March 2013 and assumed his registration had been changed.

Wogan said he could find no law that required Street to be registered as a Democrat when he filed his nomination petitions for the party's primary.

Street has repeatedly accused State Sen. Anthony H. Williams, another Democrat running for mayor, of organizing the challenge to his candidacy in a belief that Street would draw some African American voters away from Williams; both men are black. Street has offered no proof to support his claim.

"Pretty good job campaigning for Sen. Williams," Street said in court Wednesday when Greenberg finished making his legal arguments.

Williams' campaign has shrugged off Street's claims with this simple saying: "Consider the source."

Greenberg challenged Street's candidacy on behalf of a concerned voter - Joseph Coccio, treasurer of the Transit Workers Union, Local 234, which has endorsed Williams for mayor.

Street, 75, who has not held political office in three decades, ran for mayor in 2011 while on supervised release after serving 26 months in federal prison for not paying taxes on $3 million in income.

Mayor Nutter, seeking reelection that year, challenged Street's residency in court. Street survived that challenge and went on to win 24 percent of the vote in the Democratic primary.