After a day of polling, it's now down to the nitty-gritty procedures relating to counting.

At the close of the day, the presiding officer at the 8,000 polling stations across the nation will seal the ballot boxes in the presence of the candidates' polling agents.

All of them are to affix their signatures or seals on the ballot boxes. Then the Election Commission officer will compare the number of ballot papers issued based on his or her records with those not used in front of the polling agents. The numbers must match.

When all the ballot papers are accounted for, the presiding officer will reopen the boxes and proceed to count the ballots in front of the agents.

Each ballot paper will be shown to the agents as it is counted. Ballot papers which do not conform to the rules, such as spoilt votes, will be marked ‘rejected’ while the accepted ones will be added to the respective candidates tally.

After the votes are counted at the various polling stations, a statement of the results of the poll will then be sent to the returning officer at the central counting centre located in each constituency.

The returning officer, on receiving the results from the polling stations, will add all these votes, inclusive of postal votes, to determine the winner.

Once this is done, the returning officer will declare the winning candidate as the elected representative of that constituency.

Recount of votes

Where the number of votes differs from the number of ballot papers found in the ballot box by one percent, or the difference between the winning candidate and the losing one is two percent or less of the total number of votes cast, upon application of either of the agents, a recount shall be made only once.

However, the presiding officer has the discretion to order more recounts until he is satisfied that it is correct.

In this election, counting is done at the polling stations unless the state EC specifies a central counting centre.

Election Commission had earlier said that the first result is expected to be known as early as 7pm while the attaining of a simple majority is expected to be announced around 10.30pm.

Malaysiakini will be providing live reports as the results are known tonight.

Election petition

After the returning officer has announced the results, the losing candidate has the right to challenge it in court. However, it has to meet these conditions:

i) bribery, intimidation or any misconduct that may have affected the result of the election;

ii) non-compliance with election laws and regulations;

iii) corrupt or illegal practice committed by the candidate or any of his agents;

iv) the candidate or his agent found to be disqualified for the election.

The election petition must be made at the High Court within 21 days after the results are gazetted.

An election judge will then be appointed and if the court, after conducting a trial over an election petition, decides the election to be void, EC will give notice of a by-election for the constituency concerned.