By Lanre Ola

MAIDUGURI, Nigeria (Reuters) - Suspected Boko Haram militants attacked Nigeria's northern city of Maiduguri in Borno state on Wednesday from a cashew plantation a few kilometres from the Giwa barracks, military

Residents said they heard heavy shooting and explosions on the outskirts and began fleeing their homes. The fighting began around 6:45 p.m. (1745 GMT) before subsiding by around 9:00 p.m. (2000 GMT).

Abdul Musa, a resident, said the intense fighting had dwindled to a few intermittent gunshots.

The city of around two million people is the birthplace of Boko Haram, which has killed thousands in its attempt to carve out an Islamist state in the country's northeast.

Maiduguri has not been attacked since two major takeover attempts in late January and early February and several bombings in March.

A security source, who participated in the operation, said they fought off several hundred insurgents, which included

suicide bombers.

"Some civilian youth vigilante who went to battle may have lost their lives," he said. "(They) were trying to evacuate some women from a community behind the Giwa barracks when a bomb exploded from a woman suspected to be a suicide bomber."

Boko Haram claimed an area larger than Belgium last year and

was fast becoming a regional threat after it increased

cross-border incursions.

Chadian and Nigerian troops entered the fray earlier this year and drove the militants out of some key Borno towns. Cameroonian forces pushed them out of its border areas.

The Nigerian military has since launched a ground offensive on the group's last stronghold, in the Sambisa forest reserve.

(Reporting By Lanre Ola, Additional reporting by Ardo Abdallah and Afolabi Sotunde, Writing by Julia Payne, Editing by Larry King)