Labour Leader David Cunliffe says he has been given a written police warning about a tweet he posted on the day of the Christchurch East byelection urging people to vote for Labour candidate Poto Williams.
Mr Cunliffe says he has taken the warning on board and will not repeat the error.
The tweet said: "If you are resident in Christchurch East don't forget to vote today - for Labour and Poto Williams."
At the time he had about 6,400 followers on Twitter.
The tweet was referred to the police by the Electoral Commission - electioneering is banned on election day.
The Electoral Commission said it believed the post constituted a breach of section 197 (1)(g)(i) of the Electoral Act because it was a statement published on polling day "advising, or intended, or likely to influence electors as to the candidate for whom they should or should not vote in the byelection".
"It was an inadvertent mistake which I regret." Mr Cunliffe said. I took steps to rectify the error by immediately deleting the tweet and Labour also notified the Returning Officer as soon as possible."
He said he would like to acknowledge his mistake by doing something to help the people of Christchurch.
"I intend to make a $1,000 donation to the Stepping Stone Foundation which provides counselling services to earthquake-affected children."
Graham McCready, the retired accountant who initiated the private prosecution against Act leader John Banks over 2010 donations to his Auckland mayoral bid earlier vowed to take a private prosecution against Mr Cunliffe over the tweet if the police did not prosecute.
He could not be reached for comment.