— State Sen. Josh Stein, D-Wake, announced Monday he is resigning his seat to campaign for North Carolina attorney general.

Stein will face fellow state Sen. Buck Newton, R-Wilson, in the general election. In posts on Twitter and Facebook, Stein wrote that he didn't want the campaign to distract from work on the legislature's short session, scheduled to begin April 25.

The Raleigh attorney has served in the state Senate for seven years.

"In the General Assembly, I have stood up for issues important to my district and to North Carolina as a whole, including public education, economic development and public safety," Stein wrote.

In unofficial primary results in the race for attorney general, Stein edged out Democratic opponent Marcus Williams by about 6 percentage points. Newton, meanwhile, leads Republican opponent Jim O'Neill by about 10 points.

Wake County Democratic Party Chair Brian Fitzsimmons said in a statement Monday that Stein's "voice will be missed in the Senate."

"He has been a tireless advocate for public schools in Wake County and across North Carolina and has consistently worked with members of both parties to do what is right for the people of Wake County," Fitzsimmons said. "North Carolina is stronger because people like Senator Stein decide to serve."

It's now up to the leadership of the county party to recommend a replacement, who will be formally appointed to the seat by Gov. Pat McCrory. Stein hinted that may be Jay Chaudhuri, who won the Democratic nomination for Stein's District 16 seat in the primary last week.

Stein's announcement comes as state lawmakers mull an early return to Raleigh for a special session to overturn a Charlotte City Council ordinance that would prohibit businesses from discriminating against customers based on their sexual preference or identity and allow those who are transgender to use public bathrooms based on their gender identity.