A near-complete vote count showed that Djukanovic won 54.0 percent of the ballots while his main opponent, Mladen Bojanic, had 33.3 percent, Montenegro's state election authorities said.
Lawmaker Draginja Vuksanovic, the first-ever female presidential candidate in the staunchly conservative, male-dominated Balkan nation on the Adriatic Sea, came in third with 8.2 percent.
Sunday's vote, the first since Montenegro joined the NATO Western military alliance in December, was seen as a test for Djukanovic, who favors European integration over closer ties to traditional ally Moscow.
Djukanovic led Montenegro to independence from much-larger Serbia in 2006 and was behind last year's accession into NATO, which Slavic ally Russia strongly opposed.
He said Sunday that his victory means Montenegro will stick to its plan to join the European Union next.
Djukanovic has dominated Montenegrin politics for nearly 30 years, serving both as president and prime minister in several governments. Analysts predicted he will add weight to the largely ceremonial presidency. Incumbent President Filip Vujanovic did not run due to term limitations.
"His authority overcomes that of a president and I am certain that Djukanovic will have a much more important role than previous presidents," analyst Milos Besic said on the state TV Montenegro.
Opposition have accused Djukanovic of corruption and blamed the government led by his ruling Democratic Party of Socialists for a spike in crime-related violence.
In his victory speech late Sunday, Djukanovic promised to work to overcome divisions within Montenegro, where many still cherish close ties with Moscow.
Djukanovic was prime minister during a tense October 2016 parliamentary election when authorities said they thwarted a pro-Russian coup attempt designed to prevent the country from joining NATO.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.