Jean-Francois Cope, an ally of ex-president Nicolas Sarkozy, won 50.03% of the vote, defeating ex-PM Francois Fillon, who polled 49.97%, by just 98 votes.
The final result was delayed for more than 24 hours.
Jean-Francois Cope, the UMP secretary general, is on the right of the party, while Francois Fillon is seen as more of a centrist.
Party grandees had urged the two candidates to end their war of words, warning that the UMP had been damaged.
Jean-Francois Cope, 48, said he had telephoned Francois Fillon, 58, to ask him to join him at the heart of the UMP “because our opponents are on the left”.
“My hands and my arms are wide open,” he told supporters after the result was announced.
“It is in that state of mind that I telephoned Francois Fillon this evening, it is in that state of mind that I asked him to join me.”
Francois Fillon, speaking after his rival’s victory speech, mentioned “many irregularities” in the electoral process but stopped short of rejecting the result.
He also warned of a deepening split in the UMP.
“What strikes me is the rift at the heart of our political camp, a political and moral fracture,” he said.
Opinion polls had consistently given Francois Fillon the edge, but initial results on Sunday showed a narrow lead for Jean-Francois Cope.
The UMP held the presidency of France for 17 years, until May, when Socialist candidate Francois Hollande defeated Nicolas Sarkozy’s bid for a second term.
The two candidates have different visions for the party.
Jean-Francois Cope is considered more right-wing. Last month he produced “A Manifesto for an Uninhibited Right” in which he claimed that gangs in the city suburbs were fostering “anti-white racism”.
Francois Fillon is seen as sober and more restrained.
The winner will inherit a party in difficult financial straits, after a series of electoral setbacks over the past five years, culminating in Nicolas Sarkozy’s presidential defeat to Socialist rival Francois Hollande.
Jean-Francois Cope
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…