Nine million registered voters have been choosing a president and municipal council representatives in one of the poorest nations in the world.
Ali Abdullah Saleh, a military officer who became leader of North Yemen in 1978 and has ruled all of the country since its unification in 1990, enjoys absolute power.
He won the first direct election in 1999, but the opposition boycotted the vote.
The president cast his ballot early on Wednesday saying: "The Yemeni people are the victorious ones."
Saleh was up against four men, including Faisal al-Shamlan, a former oil minister who was nominated by a coalition of opposition parties, and is running on a platform of political and economic reform in Yemen.
"Shamlan is attractive because people know who he is from his days in government," one Western diplomat said. "[But] all that means is that he will gain a larger percentage of the vote and Saleh will win."
The other three candidates have little political experience and stood as independents. Two of them support the current government.
Polling day was declared "a day
without arms" to avoid violence
Security was heightened after suicide bombers attempted to attack two oil installations last week.
Nearly 90,000 troops and police were deployed at the country's 5,620 polling stations.
In a country where there are an estimated three weapons for every person the government declared Wednesday "a day without arms".
Officials made an exception for the jambiyya dagger, a traditional sign of manliness, allowing it to be worn during voting, but not the counting of ballots.
Three people were killed and two wounded in disputes outside polling stations in the province of Taiz, 270km south of the capital, Sana.
A candidate in the municipal elections, Khalid Hassan, whose party backs Shamlan, was killed in one gunbattle outside a polling station when supporters of opposing candidates argued over claims that people were being blocked from entering.
At least seven polling stations across the province were closed because of violence.
Yemen has become an important ally in Washington's war on terrorism, and Saleh made security a major issue in his campaign.
Saleh has been largely successful in combating al-Qaeda, improving relations with the US and overseeing a multi-party political system, but his government is accused of corruption and unemployment is rife.
The opposition coalition has accused the ruling party of forging voter lists, as well as intimidating and arresting Shamlan supporters.
On the eve of the poll, Saleh said police had arrested one of Shamlan's bodyguards for belonging to al-Qaeda.
The opposition candidate said it was a ploy to discredit him.