LAS CRUCES, N.M. (AP) — A southern New Mexico county clerk who faced a lawsuit for issuing same-sex marriage licenses is donating the rest of his defense fund to a pro-gay marriage campaign.

The Las Cruces Sun-News reports (http://bit.ly/1adpWhE ) that Dona Ana County Clerk Lynn Ellins plans to give the money to New Mexico Unites for Marriage Equality.

Ellins, who announced his decision Friday, says a few thousand dollars are left.

In September, a website raised $33,067 for Ellins' defense in a lawsuit filed by a group of state legislators challenging the issue of the licenses. Another $3,000 came from mail-in donations.

Dona Ana County officials say Ellins' legal expenses were about $31,000.

The New Mexico Supreme Court ruled in December that barring same-sex couples from getting marriage licenses was unconstitutional.