KUALA LUMPUR, Malaysia -- Millions of Malaysians will go to the polls on Sunday to decide what appears to be the most closely contested election in their country's history, whose results will bring either a continuation of decades of leadership by the current government or the nation's first handover of power.
While both Prime Minister Najib Razak's governing National Front coalition and the opposition three-party People's Alliance are publicly expressing confidence, independent analysts said the race remained neck-and-neck as the 15-day official campaign period nears its end on Saturday.
"Going by conventional wisdom, the government has the advantage, but the opposition could pull off a surprise," said Ibrahim Suffian, director of the Merdeka Center, an independent polling organization. "It's within the margin of error."
The campaign has been marred by violence, opposition claims of vote-rigging by the government, a cyberattack on a leading online news service and even a dispute over whether the ink that will be applied to voters' index fingers to ensure that they vote only once can be easily rubbed off.
Malaysia's 13.3 million registered voters have been given a stark choice: to continue a political and economic system based largely on race, by a group that has firmly held power since the country's independence in 1957, or follow a completely new direction, with a combative but untested opposition promising dramatic changes.
"It's either to accept that we need to mature as a country and support reform, or be stuck in the old ways of semiauthoritarianism, controlled media, an economic policy lacking in transparency and using the old race-based economic policies," the People's Alliance leader, Anwar Ibrahim, said in an interview.
Mr. Najib has countered with a "stay the course" argument, offering political, social and economic changes and saying that the government's policies have maintained Malaysia as a stable, modern emerging country with Southeast Asia's third-largest economy.
"That is why the opposition's call for reform has had a poor response from the people," Mr. Najib said during a campaign rally this week in the northern state of Terengganu. "Which is better: street demonstrations or respecting the law? Which is better: sowing discord in the community or inculcating good moral values?"
The governing coalition is led by the United Malays National Organization, the party of Mr. Najib, who is the son of a former prime minister. Mr. Anwar is a former senior leader of the party and deputy prime minister who was ousted in a power struggle in 1998 with Mahathir Mohamad, who was then prime minister. He was imprisoned from 1999 to 2004 after convictions on sodomy and corruption charges that he said were politically motivated.
Mr. Anwar has accused Mr. Najib's government of authoritarian leanings, of turning a blind eye to official corruption, and of continuing to play race-based politics by giving preferential economic treatment to ethnic Malays, who account for about 60 percent of Malaysia's 29 million people.
He also said the government's refusal to give him more than 10 minutes of airtime on state television and its decision to give cash handouts to poor families ahead of the election campaign were desperation tactics.
"They refuse to acknowledge and learn, and they are resisting change," Mr. Anwar said. "Look at Thailand, Indonesia, the Philippines -- they are far ahead. Even Myanmar, where the opposition can have a say on television during election campaigns."
Koh Tsu Koon, a cabinet minister and senior member of the governing coalition, countered during an interview that Mr. Najib had instituted serious political changes, including the abolition of the Internal Security Act, under which suspects could be detained without trial, and the ending of a state-of-emergency ordinance put in place after race riots in 1969.
The National Front has been handing out a 23-page government progress report at campaign rallies noting that Malaysia had a 5.6 percent growth rate in 2012 and that its gross national income grew 41 percent in the last three years.
On Thursday, Mr. Anwar said the government might have helped fly more than 40,000 "dubious" voters to key states to bolster its chances of winning. The government has denied the allegation, saying it has traditionally helped Malaysians working in the country's eastern states on the island of Borneo to return to their home regions to vote.
But on Friday, local election groups said there was evidence that some of those flown in were foreign nationals, including from Indonesia and the Philippines.
Ambiga Sreenevasan, chairwoman of the Coalition for Clean and Fair Elections, said the number of people being flown in was far greater than any possible number of registered Malaysian voters going home. "We know the playing field for this election has not been level," she said. "The wish is that it's the true will of the people that should prevail in these elections, but the fear is that it may not."
This article originally appeared in The New York Times.