Dr John Marek : blow for Labour
Rebel candidate John Marek is back in the Welsh assembly - but as the first independent AM, after defeating his former party in the elections.
Dr Marek's total of 6539 votes beat Labour rival, his former secretary Lesley Griffiths, into second place by just under 1,000 votes.
It will be bitter news for the Labour party, who deselected him following dissent with the local party.
The politician, who has been either MP or AM in Wrexham for 20 years, hit back and stood as a John Marek Independent candidate.
His election represents the first real setback for Labour of the night.
Speaking after his election, Dr Marek told BBC Wales: "I think I have been of service to Wrexham people and Wrexham people have shown their confidence in me.
Alyn & Deeside - Carl Sargeant Lab hold
Delyn - Sandra Mewies Lab hold
Clwyd South - Karen Sinclair Lab hold
Clwyd West - Alun Pugh Lab hold
Vale of Clwyd - Ann Jones Lab hold
Wrexham - John Marek Independent gain
"The Labour party campaign was one of lies and smears. On the other hand I did detect a wish to vote for an alternative to the established parties.
"In Wrexham we provided that alternative and that may have contributed to my win.
"The councillors in Wrexham embarked upon a conspiracy of smears and lies and got me deselected on the narrowest of margins.
"The decision was should I be rolled over and simply go or should I fight this disgraceful campaign and I decided to do the latter and as it turns out the public have supported me.
Asked how he could make a difference in the assembly as an independent, he replied: "I shall be looking at it on an issue by issue basis.
Fuel protester Brynle Williams was elected
"Any policies put forward by any parties which are for the benefit of Wrexham and the people of Wales, I shall support.
Just over 34% of the electorate turned out to vote in Wrexham.
Labour candidate Lesley Griffiths said she blamed voter apathy for the party's loss.
"The low turnout didn't help me," she said.
"So many people told me they wanted to keep Wrexham a Labour town."
Dr Marek upset some within the Labour group by standing against another of his party's AMs for the post of assembly deputy presiding officer, and winning.
North Wales regional list members
Brynle Williams - Conservative
Mark Isherwood - Conservative
Janet Ryder - Plaid Cymru
Eleanor Burnham - Liberal Democrat
He was also accused of making comments that undermined his party in a private letter to a Communication Workers Union official.
These issues led to his de-selection and the reselection battle which he lost to Mrs Griffiths.
Welsh Labour leader Rhodri Morgan said he was disappointed the party lost Wrexham.
"It's a pity we didn't win Wrexham but that's one of those things," he said.
In neighbouring constituency Clwyd South, the John Marek Independence Party, represented by Marc Jones, was not able to repeat its success in Wrexham.
Karen Sinclair held the seat for Labour with a slightly reduced majority of 15.4% .
The standing Clwyd West AM Alun Pugh held his seat despite a strong showing by Tory challenger Brynle Williams.
Mr Williams came to prominence during the fuel protests in 2000 and later announced his intention to stand for the assembly.
Initially he considered standing as an Independent but then plumped for the Conservatives.
Mr Pugh managed a majority of 436 and a slight swing to Labour.
However Mr Williams will become an AM in any case by virtue of the North Wales regional seat list, which he tops for the Conservatives.
Alyn and Deeside - which had the lowest election turnout at 25% retained its Labour seat alongside Delyn and the Vale of Clwyd.