A soldier from Ghana casts his ballot during a special voting session for the military in the presidential elections in Accra, Ghana, on Dec. 4, 2012. (LEGNAN KOULA/EPA)

In a tiny shack along a railway line in Ghana’s capital, Kwadwo Taiwah scratches a living out of art.

He usually paints portraits of customers or their music or football heroes. In recent weeks, as fiercely contested elections in West Africa’s second-largest economy approached, Taiwah, 34, has turned his paintbrush to politics.

On one side of his studio door is a picture of President John Mahama. On the other is the main challenger, Nana Akufo-Addo, whose pledge to provide free secondary schooling has earned Taiwah’s vote and may yet shape the poll result.

“I didn’t get a good education,” Taiwah said, “because I had no money. If Nana comes in, I may go back to school.”

The presidential and parliamentary contests set for Friday are expected to be close. Under the winner-takes-all system, the prize is control over billions of dollars in oil and gas revenues expected to flow in the next four years, giving the victorious party the potential means not only to transform the economy but also to stay in power for a long time.

With Ghana’s economy booming — the International Monetary Fund predicts 8.2 percent growth this year, thanks to oil, cocoa and gold production and a strong construction and service sector — the ruling National Democratic Congress might be expected to have a strong advantage.

But perhaps uniquely in Africa, Ghana has developed a recent tradition of tight elections, with power changing hands from the nominally center-left NDC to the center-right New Patriotic Party in 2000 and back again in 2008, when the winning margin was only about 40,000 votes. The peaceful handovers have made the country something of a model for the continent and helped attract foreign investment.

“Ghanaians are divided around two main parties just like the Democrats and Republicans in the U.S., so we always have a strong opposition,” said Bossman Asare, a political science lecturer at the University of Ghana. “Like in 2008, it’s very hard to predict a winner.”

Mahama, 54, who studied in the former Soviet Union, was vice president until the death in July of then-president, John Atta Mills. Affable and measured, Mahama has campaigned on the ruling party’s record of improving health care and education, and on the strong economy. Oil production commenced in 2010, the fiscal deficit has been cut and the country achieved lower middle-income status last year for the first time.

Mahama is setting a target of 8 percent growth until 2016. Even so, he says the opposition’s plan to provide free senior high school tuition is not financially or practically viable, a view echoed by some of his supporters.

“We have not yet got the schools and teachers to support it,” said Daniel Addo, a 38-year-old driver. “Let Mahama first improve the quality of schools and continue other good work.”

Internal divisions have hurt the NDC, which, if it loses, will be the first party in Ghana to exit after a single term. Party founder and former president Jerry Rawlings has been lukewarm in his support, and his wife, Nana Konadu Rawlings, has set up her own party. Perceptions of high-level corruption have also hurt the party.

The NPP is regarded as the more pro-business, pro-western party. Akufo-Addo, 68, a lawyer and former attorney general, describes himself as “the man to trust with Ghana’s money.”

He says the country’s economic growth has created few jobs and few benefits for the majority of its 25 million people. Speaking to the Financial Times earlier this year, Akufo-Addo also promised to renegotiate the terms of a $3 billion loan from China.

Ethnic and regional factors will influence voting, but increasing urbanization and political awareness mean that policy is expected to play a bigger role than before. Akufo-Addo knows that a repeat of his 2008 loss could end his presidential ambitions.

“The NPP knows how the game is run, so it can’t wait to get their hands on the till,” said Emmanuel Gyimah-Boadi, executive director of the Ghana Center for Democratic Development. “The president controls all the political, economic and symbolic resources. That’s why the vote is so intense.”

Despite Ghana’s democratic credentials, the country’s politics are often acrimonious and vicious. Campaigning has been mostly peaceful but Gyimah-Boadi says the heightened political tension means violence after the vote is not impossible.

“We all have fears, but typical of us Ghanaians, we pray that they won’t happen,” he said.

Besides the main two candidates, there are six other presidential challengers. If no one wins 50 percent of the vote, a runoff will take place on Dec. 28.

In his studio by the railway tracks, Taiwah knows it may come to that. After posing for a photograph with his painting of Akufo-Addo, he asks to have one taken with his painting of Mahama, “just to be sure.”

— Financial Times