DAKAR, Senegal — Nigeria’s election agency on Saturday night put off a closely contested presidential election after weeks of pressure to postpone it from the ruling party, which analysts say was facing potential defeat for the first time in more than 15 years.

The move is sure to anger the opposition, which has been arguing against a postponement, and inflame its supporters in a volatile electoral environment.

The election, originally scheduled for next Saturday, will now be held March 28, the election agency head told a news conference in Abuja, Nigeria’s capital, late Saturday night. The elections official, Attahiru Jega, after days of what were reportedly heated meetings with the government, cited “security” concerns for the delay. He said that Nigeria’s top military men — themselves close to the government — refused to ensure that security would be “guaranteed” if the vote went ahead as scheduled.

The country’s northeast has been in the grip of an Islamist insurgency waged by the Boko Haram terrorist group for nearly six years, with the country’s military unable to contain it. It was not immediately clear how that standoff might change in the coming six weeks.