Former D.C. Council candidate A.J. Cooper, right, talks to a resident in August. (Macy L. Freeman/The Washington Post)

Former D.C. council candidate A.J. Cooper, who touted during his campaign that he’s been a lifelong independent, switched his party affiliation Thursday and registered as a Democrat.

Cooper, 32, joined the Democratic Party as he gears up to compete in the special election this spring for the council seat that Phil Mendelson is giving up after being elected chairman last week.

Cooper, nephew of philanthropist Peggy Cooper Cafritz, comes from a prominent local family.

During his past campaign for one of two council seats reserved for a non-Democrat, Cooper criticized both incumbent Michael A. Brown (I) and challenger David Grosso for previously switching parties to become independents so they could seek the seat.

“It shows a deficiency in their character because they are gaming the system,”Cooper told The Washington Post last month. “If you are a Democrat, then run as a Democrat.”

Cooper, a policy director at the D.C. Campaign to Prevent Teenage Pregnancy, argued at the time that he deserved the seat because he’s been a lifelong independent. He said he registered as an independent after high school to show his independence from his Democratic family.

But now that he’s preparing to run in the special election, Cooper has apparently decided it’s better to run under the Democratic label.

“I was raised in a Democratic family, and I’ve always been a supporter of the Party,” Cooper in a statement. “I joined because I realized that, as a Democratic stronghold right here in our President’s backyard, we have a unique opportunity to advance the Party’s ideals while moving our city forward. I look forward to collaborating with and learning from the wisdom of Party leadership, while also ensuring that we serve as a voice for those who may be feeling left behind in our city.”

Cooper is not likely to be the only contender in the race to change parties to seek the seat as a Democrat. Brown, who lost to Grosso in last week’s election, is also considering running in the special election.

If he does, Brown said he will most likely run as a Democrat.

All the party switching is likely to raise new questions about whether the District should consider moving to nonpartisan elections. It also shows how few District politicians are willing to take the chance that a heavily Democratic city electorate will vote for an independent in a partisan race.