Angola's election has been overshadowed by many woes, including a struggling economy, inflation, poverty, drought and the death of a former President Jose Eduardo dos Santos last month.
"All votes have been cast," said Lucas Quilundo, a spokesman for Angola's electoral commission after polls closed. "We can consider that the elections were a success and took place in an exemplary manner."
Results are expected within a few days. In past elections, results have been contested in a process that can take several weeks.
The People's Movement for the Liberation of Angola (MPLA), which has ruled the oil-rich nation for nearly five decades, faced its most serious challenge since the first multi-party vote in 1992.
Eight political parties were running, but the real contest lay between the MPLA and long-standing rival and ex-rebel movement the National Union for the Total Independence of Angola (UNITA).
Pre-voting opinion polls suggested that support for the MPLA — which won 61% of the vote in 2017 elections — would dwindle, while UNITA — which has entered an electoral pact with two other parties — would make gains.
But UNITA's inroads might not be enough to unseat Lourenco, 68, who succeeded veteran leader Jose Eduardo dos Santos five years ago.
Dozens of voters lined up at polling stations in the early morning, but by midday they had slowed to a trickle.
Both leading candidates — Lourenco at the capital's Lusiada University and Costa Junior in the working-class Nova Vida district — called on the public to make their voices heard while casting their ballots.
Some stations started to close in the early evening about an hour before the scheduled time, AFP reporters said.