In this Oct 9, 2011 file photo, Cameroon President Paul Biya waves after casting his vote during the presidential elections in Yaounde, Cameroon. (AP Photo/Sunday Alamba)

YAOUNDE, Cameroon (AP) -- Cameroon's president says Boko Haram has been defeated in the country, the first such announcement since he declared war on the extremist group four years ago.

President Paul Biya spoke during his first visit to the Far North region since 2012 as he campaigned on Saturday ahead of the Oct. 7 election. The 85-year-old, one of Africa's longest-serving leaders, has been in power since 1982 and is likely to win again as the fractured opposition has been unable to put forward a strong candidate.

Security is a major issue in Cameroon, a U.S. and French military ally, as it also faces a bloody English-language separatist movement in the southwest and northwest.

Addressing a rally in Maroua, Biya said he would focus on rebuilding what has been destroyed in the Far North "now that terrorism has been defeated."

The region for years has been the target of suicide bombings and other attacks by Boko Haram fighters who spilled over the border from Nigeria, where the extremist group is based. Nearly a quarter-million people in Cameroon have been displaced.

Boko Haram has not carried out a major attack in Cameroon in the past year and the number of attacks has fallen. Its fighters continue to attack military targets and cities in Nigeria's northeast despite repeated government declarations that it has been "crushed."

Biya warned Far North residents to remain vigilant despite recent progress including the re-opening last month of 40 schools along the border.

Not everyone warmed to the president's comments at the rally.

Biya had abandoned the Far North and its people, said Garga Haman Adji, candidate with the Alliance for Democracy and Development opposition party.

"Biya never visited to encourage the soldiers who fought to defeat Boko Haram. He never visited people suffering from terrorism and is now here to beg for votes," Garga said.

The fight against Boko Haram has raised questions about Cameroon's security forces. Shocking videos that recently circulated online showed soldiers shooting defenseless civilians including women with young children strapped to their backs, Amnesty International said after expert analysis. Cameroon's government has announced several arrests related to one of the videos and said any alleged abuses will be investigated.

Biya has not announced any campaign visits to the troubled southwest and northwest where fighting between government forces and the Anglophone separatists has killed nearly 400 people and sent nearly 200,000 civilians fleeing.

A heavy military deployment and recent crackdown on suspected separatist hideouts especially in the southwest, however, indicates that the president intends to visit in an effort to show the world that in spite of the tensions he remains in control.

Biya last visited the southwest in 2014 and the northwest in 2010.

The unrest began in 2016 when teachers and lawyers peacefully expressed dissatisfaction with what some English speakers, who make up about 20 percent of the country's population, have called marginalization by French-speaking authorities in the officially bilingual country.

The armed separatist movement followed with the declaration of an independent state called "Ambazonia." In recent weeks both weary civilians caught in the middle of the fighting and Cameroonian religious leaders have called for peace.

The separatists vow to disrupt next week's elections.